File tree Expand file tree Collapse file tree 6 files changed +50
-22
lines changed Expand file tree Collapse file tree 6 files changed +50
-22
lines changed Original file line number Diff line number Diff line change @@ -2,13 +2,8 @@ AliasInt input.d /^alias AliasInt = int;$/;" a file:
22CT input.d /^ class CT(T)$/;" c class:Class file:
33Class input.d /^class Class : Interface$/;" c file:
44Enum input.d /^enum Enum : int$/;" g file:
5- IT input.d /^interface IT(T){}$/;" i file:
65Interface input.d /^interface Interface$/;" i file:
7- ST input.d /^struct ST(T){}$/;" s file:
86Struct input.d /^struct Struct$/;" s file:
9- Template input.d /^template Template(alias a, T...)$/;" T file:
10- TemplateAlias input.d /^ alias TemplateAlias = a!T;$/;" a file:
11- UT input.d /^union UT(T){}$/;" u file:
127Union input.d /^ union Union$/;" u struct:Struct file:
138_bar input.d /^ private AliasInt _bar;$/;" m class:Class file:
149attr_anon input.d /^@(obj) T attr_anon;$/;" v
Original file line number Diff line number Diff line change @@ -58,19 +58,6 @@ public
5858 int modulevar;
5959}
6060
61- // declaration templates
62- interface IT (T){}
63- struct ST (T){}
64- union UT (T){}
65- // FIXME - parsed as 'T'
66- // alias AT(T) = T;
67- // enum ET(T) = T.init;
68-
69- template Template (alias a, T... )
70- {
71- alias TemplateAlias = a! T;
72- }
73-
7461Object obj;
7562
7663const (int )* type_con;
Original file line number Diff line number Diff line change 1+ --sort=no
Original file line number Diff line number Diff line change 1+ Template input.d /^template Template(alias a, T...)$/;" T file:
2+ TemplateAlias input.d /^ alias TemplateAlias = a!T;$/;" a template:Template file:
3+ memb input.d /^ int memb;$/;" m template:Template file:
4+ b input.d /^Foo!x b;$/;" v
5+ each input.d /^template each(alias fun = "a")$/;" T file:
6+ child input.d /^ template child(){}$/;" T template:each file:
7+ tmethod input.d /^ void tmethod()(){}$/;" f template:each
8+ ImplementLength input.d /^mixin ImplementLength!source; \/\/ FIXME source too!$/;" X
9+ source input.d /^mixin ImplementLength!source; \/\/ FIXME source too!$/;" X
10+ IT input.d /^interface IT(T){}$/;" i file:
11+ ST input.d /^struct ST(T){}$/;" s file:
12+ UT input.d /^union UT(T){}$/;" u file:
Original file line number Diff line number Diff line change 1+ template Template (alias a, T... )
2+ if (is (typeof (a)))
3+ {
4+ private :
5+ // no parent:
6+ alias TemplateAlias = a! T;
7+ int memb;
8+ }
9+
10+ Foo ! x b;
11+ Foo ! (x) c; // FIXME
12+ Foo ! (x < 2 ) d; // FIXME
13+ void f (Foo ! x); // FIXME
14+
15+ template each (alias fun = " a" )
16+ {
17+ template child (){}
18+ void tmethod ()(){}
19+ }
20+
21+ // FIXME
22+ /+
23+ int vt(alias a) = 0; // not parsed
24+ // parsed as T:
25+ alias AT(T) = T;
26+ enum ET(T) = T.init;
27+ +/
28+
29+ mixin ImplementLength! source; // FIXME source too!
30+
31+ // declaration templates
32+ interface IT (T){}
33+ struct ST (T){}
34+ union UT (T){}
Original file line number Diff line number Diff line change @@ -2866,9 +2866,7 @@ static int tagCheck (statementInfo *const st)
28662866 case TOKEN_BRACE_OPEN :
28672867 if (isType (prev , TOKEN_ARGS ))
28682868 {
2869- if (st -> declaration == DECL_TEMPLATE )
2870- corkIndex = qualifyBlockTag (st , prev2 );
2871- else if (st -> declaration == DECL_FUNCTION_TEMPLATE )
2869+ if (st -> declaration == DECL_FUNCTION_TEMPLATE )
28722870 {
28732871 corkIndex = qualifyFunctionTag (st , st -> blockName );
28742872 }
@@ -2880,7 +2878,8 @@ static int tagCheck (statementInfo *const st)
28802878 /* D declaration templates */
28812879 if (isInputLanguage (Lang_d ) &&
28822880 (st -> declaration == DECL_CLASS || st -> declaration == DECL_STRUCT ||
2883- st -> declaration == DECL_INTERFACE || st -> declaration == DECL_UNION ))
2881+ st -> declaration == DECL_INTERFACE || st -> declaration == DECL_UNION ||
2882+ st -> declaration == DECL_TEMPLATE ))
28842883 corkIndex = qualifyBlockTag (st , prev2 );
28852884 else
28862885 {
You can’t perform that action at this time.
0 commit comments