MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / ice10651.d
blob8b6c7200bb72ac61e57d886f917ef76b941bc1ab
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/ice10651.d(13): Error: can only throw class objects derived from `Throwable`, not type `int*`
5 fail_compilation/ice10651.d(19): Deprecation: cannot throw object of qualified type `immutable(Exception)`
6 fail_compilation/ice10651.d(20): Deprecation: cannot throw object of qualified type `const(Dummy)`
7 ---
8 */
10 void main()
12 alias T = int;
13 throw new T(); // ICE
16 void f()
18 immutable c = new Exception("");
19 if (c) throw c;
20 throw new const Dummy([]);
23 class Dummy: Exception
25 int[] data;
26 @safe pure nothrow this(immutable int[] data) immutable
28 super("Dummy");
29 this.data = data;