| 1 |
/* REQUIRED_ARGS: -vtemplates=list-instances |
| 2 |
TEST_OUTPUT: |
| 3 |
--- |
| 4 |
compilable/vtemplates_list.d(19): vtemplate: 4 (3 distinct) instantiation(s) of template `foo(int I)()` found, they are: |
| 5 |
compilable/vtemplates_list.d(25): vtemplate: explicit instance `foo!1` |
| 6 |
compilable/vtemplates_list.d(26): vtemplate: explicit instance `foo!1` |
| 7 |
compilable/vtemplates_list.d(27): vtemplate: explicit instance `foo!2` |
| 8 |
compilable/vtemplates_list.d(28): vtemplate: explicit instance `foo!3` |
| 9 |
compilable/vtemplates_list.d(20): vtemplate: 3 (1 distinct) instantiation(s) of template `goo1(int I)()` found, they are: |
| 10 |
compilable/vtemplates_list.d(30): vtemplate: explicit instance `goo1!1` |
| 11 |
compilable/vtemplates_list.d(31): vtemplate: explicit instance `goo1!1` |
| 12 |
compilable/vtemplates_list.d(21): vtemplate: implicit instance `goo1!1` |
| 13 |
compilable/vtemplates_list.d(21): vtemplate: 2 (1 distinct) instantiation(s) of template `goo2(int I)()` found, they are: |
| 14 |
compilable/vtemplates_list.d(33): vtemplate: explicit instance `goo2!1` |
| 15 |
compilable/vtemplates_list.d(34): vtemplate: explicit instance `goo2!1` |
| 16 |
compilable/vtemplates_list.d(52): vtemplate: 1 (1 distinct) instantiation(s) of template `A()` found, they are: |
| 17 |
compilable/vtemplates_list.d-mixin-53(53): vtemplate: explicit instance `A!()` |
| 18 |
--- |
| 19 |
*/ |
| 20 |
|
| 21 |
#line 19 |
| 22 |
void foo(int I)() { } |
| 23 |
void goo1(int I)() { } |
| 24 |
void goo2(int I)() { goo1!(I); } |
| 25 |
|
| 26 |
void test() |
| 27 |
{ |
| 28 |
foo!(1)(); |
| 29 |
foo!(1)(); |
| 30 |
foo!(2)(); |
| 31 |
foo!(3)(); |
| 32 |
|
| 33 |
goo1!(1)(); |
| 34 |
goo1!(1)(); |
| 35 |
|
| 36 |
goo2!(1)(); |
| 37 |
goo2!(1)(); |
| 38 |
} |
| 39 |
|
| 40 |
// https://issues.dlang.org/show_bug.cgi?id=21489 |
| 41 |
#line 50 |
| 42 |
void test2() |
| 43 |
{ |
| 44 |
template A() {} |
| 45 |
alias ta = mixin("A!()"); |
| 46 |
} |