6 fail_compilation\noreturn.d(38): Error: Accessed expression of type `noreturn`
7 fail_compilation\noreturn.d(42): called from here: `assign()`
8 fail_compilation\noreturn.d(49): Error: Accessed expression of type `noreturn`
9 fail_compilation\noreturn.d(49): called from here: `foo(n)`
10 fail_compilation\noreturn.d(53): called from here: `calling()`
11 fail_compilation\noreturn.d(59): Error: Accessed expression of type `noreturn`
12 fail_compilation\noreturn.d(62): called from here: `nested()`
13 fail_compilation\noreturn.d(68): Error: Accessed expression of type `noreturn`
14 fail_compilation\noreturn.d(78): called from here: `casting(0)`
15 fail_compilation\noreturn.d(69): Error: Accessed expression of type `noreturn`
16 fail_compilation\noreturn.d(79): called from here: `casting(1)`
17 fail_compilation\noreturn.d(72): Error: Accessed expression of type `noreturn`
18 fail_compilation\noreturn.d(80): called from here: `casting(2)`
19 fail_compilation/noreturn.d(120): Error: uncaught CTFE exception `object.Exception("")`
21 https://github.com/dlang/DIPs/blob/master/DIPs/accepted/DIP1034.md
24 alias noreturn
= typeof(*null);
33 enum forcePass
= pass();
42 enum forceAss
= assign();
44 void foo(const noreturn
) {}
53 enum forceCall
= calling();
59 return arr
[n ? n
: n
];
62 enum forceNested
= nested();
64 noreturn
casting(int i
)
68 case 0: return cast(noreturn
) i
;
69 case 1: return cast(typeof(assert(0))) cast(double) i
;
78 enum forceCasting0
= casting(0);
79 enum forceCasting1
= casting(1);
80 enum forceCasting2
= casting(2);
83 struct HasNoreturnStruct
94 enum forceInStruct = inStruct();
96 class HasNoreturnClass
103 HasNoreturnClass hn = new HasNoreturnClass();
107 enum forceInClass = inClass();
111 static void byRef(ref noreturn n) {}
112 HasNoreturnClass hn = new HasNoreturnClass();
117 enum forceInClassRef = inClassRef();
120 enum throwEnum
= throw new Exception("");
124 https://issues.dlang.org/show_bug.cgi?id=23063
128 fail_compilation/noreturn.d(135): Error: Accessed expression of type `noreturn`
129 fail_compilation/noreturn.d(138): called from here: `func()`