| 1 |
// REQUIRED_ARGS: -de |
| 2 |
/* |
| 3 |
TEST_OUTPUT: |
| 4 |
--- |
| 5 |
fail_compilation/fail244.d(27): Deprecation: variable `fail244.StructWithDeps.value` is deprecated |
| 6 |
fail_compilation/fail244.d(28): Deprecation: variable `fail244.StructWithDeps.value` is deprecated |
| 7 |
fail_compilation/fail244.d(29): Deprecation: variable `fail244.StructWithDeps.value` is deprecated |
| 8 |
fail_compilation/fail244.d(30): Deprecation: variable `fail244.StructWithDeps.value` is deprecated |
| 9 |
fail_compilation/fail244.d(32): Deprecation: variable `fail244.StructWithDeps.staticValue` is deprecated |
| 10 |
fail_compilation/fail244.d(33): Deprecation: variable `fail244.StructWithDeps.staticValue` is deprecated |
| 11 |
fail_compilation/fail244.d(34): Deprecation: variable `fail244.StructWithDeps.staticValue` is deprecated |
| 12 |
fail_compilation/fail244.d(35): Deprecation: variable `fail244.StructWithDeps.staticValue` is deprecated |
| 13 |
fail_compilation/fail244.d(36): Deprecation: variable `fail244.StructWithDeps.staticValue` is deprecated |
| 14 |
fail_compilation/fail244.d(37): Deprecation: variable `fail244.StructWithDeps.staticValue` is deprecated |
| 15 |
--- |
| 16 |
*/ |
| 17 |
|
| 18 |
//import std.stdio; |
| 19 |
|
| 20 |
struct StructWithDeps |
| 21 |
{ |
| 22 |
deprecated int value; |
| 23 |
deprecated static int staticValue; |
| 24 |
|
| 25 |
void test(StructWithDeps obj) |
| 26 |
{ |
| 27 |
obj.value = 666; |
| 28 |
this.value = 666; |
| 29 |
auto n1 = obj.value; |
| 30 |
auto n2 = this.value; |
| 31 |
|
| 32 |
obj.staticValue = 102; |
| 33 |
this.staticValue = 103; |
| 34 |
StructWithDeps.staticValue = 104; |
| 35 |
auto n3 = obj.staticValue; |
| 36 |
auto n4 = this.staticValue; |
| 37 |
auto n5 = StructWithDeps.staticValue; |
| 38 |
} |
| 39 |
} |