4 fail_compilation/fail20000.d(25): Error: cast from `fail20000.DClass` to `fail20000.CppClass` not allowed in safe code
5 fail_compilation/fail20000.d(26): Error: cast from `fail20000.DInterface` to `fail20000.CppClass` not allowed in safe code
6 fail_compilation/fail20000.d(27): Error: cast from `fail20000.CppClass2` to `fail20000.CppClass` not allowed in safe code
7 fail_compilation/fail20000.d(28): Error: cast from `fail20000.CppInterface2` to `fail20000.CppClass` not allowed in safe code
8 fail_compilation/fail20000.d(30): Error: cast from `fail20000.DClass` to `fail20000.CppInterface` not allowed in safe code
9 fail_compilation/fail20000.d(31): Error: cast from `fail20000.DInterface` to `fail20000.CppInterface` not allowed in safe code
10 fail_compilation/fail20000.d(32): Error: cast from `fail20000.CppClass2` to `fail20000.CppInterface` not allowed in safe code
11 fail_compilation/fail20000.d(33): Error: cast from `fail20000.CppInterface2` to `fail20000.CppInterface` not allowed in safe code
12 fail_compilation/fail20000.d(35): Error: cast from `fail20000.CppClass` to `fail20000.DClass` not allowed in safe code
13 fail_compilation/fail20000.d(36): Error: cast from `fail20000.CppInterface` to `fail20000.DClass` not allowed in safe code
14 fail_compilation/fail20000.d(38): Error: cast from `fail20000.CppClass` to `fail20000.DInterface` not allowed in safe code
15 fail_compilation/fail20000.d(39): Error: cast from `fail20000.CppInterface` to `fail20000.DInterface` not allowed in safe code
18 extern(C
++) class CppClass
{ int a
; }
19 extern(C
++) class CppClass2
{ void* a
; }
20 extern(C
++) interface CppInterface
{ int b(); }
21 extern(C
++) interface CppInterface2
{ void* b(); }
22 class DClass
{ int c
; }
23 interface DInterface
{ int d(); }
25 bool isCppClass(DClass a
) @safe { return cast(CppClass
) a
!is null; }
26 bool isCppClass(DInterface a
) @safe { return cast(CppClass
) a
!is null; }
27 bool isCppClass(CppClass2 a
) @safe { return cast(CppClass
) a
!is null; }
28 bool isCppClass(CppInterface2 a
) @safe { return cast(CppClass
) a
!is null; }
30 bool isCppInterface(DClass a
) @safe { return cast(CppInterface
) a
!is null; }
31 bool isCppInterface(DInterface a
) @safe { return cast(CppInterface
) a
!is null; }
32 bool isCppInterface(CppClass2 a
) @safe { return cast(CppInterface
) a
!is null; }
33 bool isCppInterface(CppInterface2 a
) @safe { return cast(CppInterface
) a
!is null; }
35 bool isDClass(CppClass a
) @safe { return cast(DClass
) a
!is null; }
36 bool isDClass(CppInterface a
) @safe { return cast(DClass
) a
!is null; }
38 bool isDInterface(CppClass a
) @safe { return cast(DInterface
) a
!is null; }
39 bool isDInterface(CppInterface a
) @safe { return cast(DInterface
) a
!is null; }