| 1 |
// DFLAGS: |
| 2 |
// REQUIRED_ARGS: -defaultlib= |
| 3 |
// EXTRA_SOURCES: extra-files/minimal/object.d |
| 4 |
|
| 5 |
// This test ensures that interfaces and classes can be used in a minimal |
| 6 |
// runtime as long as they only contain static members. |
| 7 |
|
| 8 |
// This should compile, but will not link and run properly without |
| 9 |
// a thread-local storage (TLS) implementation. |
| 10 |
|
| 11 |
interface I |
| 12 |
{ |
| 13 |
static int i; |
| 14 |
} |
| 15 |
|
| 16 |
class A : I |
| 17 |
{ |
| 18 |
static int a; |
| 19 |
} |
| 20 |
|
| 21 |
class B : A |
| 22 |
{ |
| 23 |
static int b; |
| 24 |
} |
| 25 |
|
| 26 |
void main() |
| 27 |
{ |
| 28 |
B.i = 32; |
| 29 |
B.a = 42; |
| 30 |
B.b = 52; |
| 31 |
} |