This repository has been archived by the owner on Jun 20, 2019. It is now read-only.
/
fail244.d
39 lines (35 loc) · 1.53 KB
/
fail244.d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// REQUIRED_ARGS: -de
/*
TEST_OUTPUT:
---
fail_compilation/fail244.d(27): Deprecation: variable `fail244.StructWithDeps.value` is deprecated
fail_compilation/fail244.d(28): Deprecation: variable `fail244.StructWithDeps.value` is deprecated
fail_compilation/fail244.d(29): Deprecation: variable `fail244.StructWithDeps.value` is deprecated
fail_compilation/fail244.d(30): Deprecation: variable `fail244.StructWithDeps.value` is deprecated
fail_compilation/fail244.d(32): Deprecation: variable `fail244.StructWithDeps.staticValue` is deprecated
fail_compilation/fail244.d(33): Deprecation: variable `fail244.StructWithDeps.staticValue` is deprecated
fail_compilation/fail244.d(34): Deprecation: variable `fail244.StructWithDeps.staticValue` is deprecated
fail_compilation/fail244.d(35): Deprecation: variable `fail244.StructWithDeps.staticValue` is deprecated
fail_compilation/fail244.d(36): Deprecation: variable `fail244.StructWithDeps.staticValue` is deprecated
fail_compilation/fail244.d(37): Deprecation: variable `fail244.StructWithDeps.staticValue` is deprecated
---
*/
//import std.stdio;
struct StructWithDeps
{
deprecated int value;
deprecated static int staticValue;
void test(StructWithDeps obj)
{
obj.value = 666;
this.value = 666;
auto n1 = obj.value;
auto n2 = this.value;
obj.staticValue = 102;
this.staticValue = 103;
StructWithDeps.staticValue = 104;
auto n3 = obj.staticValue;
auto n4 = this.staticValue;
auto n5 = StructWithDeps.staticValue;
}
}