Debian Codegraph @

gcc/testsuite/gdc.test/fail_compilation/ctor_self_assignment.d

raw
1 /**
2 REQUIRED_ARGS: -de
3 TEST_OUTPUT:
4 ---
5 fail_compilation/ctor_self_assignment.d(17): Deprecation: cannot initialize field `location` with itself
6 fail_compilation/ctor_self_assignment.d(15): did you mean to use parameter `locaction`?
7 ---
8 */
9 // https://forum.dlang.org/post/[email protected]
10
11 alias Location = int;
12
13 struct Node
14 {
15 this(Location locaction, uint f)
16 {
17 this.location = location;
18 this.f = f;
19 }
20
21 Location location;
22 uint f;
23 }