Debian Codegraph @

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

raw
1 // EXTRA_OBJC_SOURCES:
2 /*
3 TEST_OUTPUT:
4 ---
5 fail_compilation/objc_class3.d(15): Error: function `objc_class3.A.test!int.test` template cannot have an Objective-C selector attached
6 fail_compilation/objc_class3.d(21): Error: template instance `objc_class3.A.test!int` error instantiating
7 ---
8 */
9
10 import core.attribute : selector;
11
12 extern (Objective-C)
13 extern class A
14 {
15 void test(T)(T a) @selector("test:"); // selector defined for template
16 }
17
18 void test()
19 {
20 A a;
21 a.test(3);
22 }