d: Merge upstream dmd, druntime 4c18eed967, phobos d945686a4.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / test18708.d
blob16530ca190779316921836354cea6ce6a2be6744
1 /* TEST_OUTPUT:
2 ---
3 fail_compilation/test18708.d(24): Error: one path skips field `s`
4 fail_compilation/test18708.d(29): Error: one path skips field `s`
5 fail_compilation/test18708.d(34): Error: one path skips field `s`
6 fail_compilation/test18708.d(39): Error: one path skips field `s`
7 ---
8 */
9 // https://issues.dlang.org/show_bug.cgi?id=18708
11 struct S { int y; @disable this(); }
13 class C
15 S s;
17 this(S t)
19 if (bar(s = t)) foo(); // OK
22 this(S t, int i)
24 i || bar(s = t);
27 this(S t, int i, int j)
29 i && bar(s = t);
32 this(S t, int i, long j)
34 i ? bar(s = t) : i;
37 this(S t, int i, byte j)
39 i ? i : bar(s = t);
43 int bar(S s);
44 int foo();
46 /***********************************/
48 class E : Exception
50 this(string msg, int line = 0, int pos = 0) pure nothrow @safe
52 if (line)
53 super("hello");
54 else
55 super(msg);
58 this(string msg, string file, size_t line) pure nothrow @safe
60 super(msg, file, line);