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 @@ -56,19 +56,6 @@ public
5656 int modulevar;
5757}
5858
59- // declaration templates
60- interface IT (T){}
61- struct ST (T){}
62- union UT (T){}
63- // FIXME - parsed as 'T'
64- // alias AT(T) = T;
65- // enum ET(T) = T.init;
66-
67- template Template (alias a, T... )
68- {
69- alias TemplateAlias = a! T;
70- }
71-
7259Object obj;
7360
7461private :
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 @@ -2843,9 +2843,7 @@ static int tagCheck (statementInfo *const st)
28432843 case TOKEN_BRACE_OPEN :
28442844 if (isType (prev , TOKEN_ARGS ))
28452845 {
2846- if (st -> declaration == DECL_TEMPLATE )
2847- corkIndex = qualifyBlockTag (st , prev2 );
2848- else if (st -> declaration == DECL_FUNCTION_TEMPLATE )
2846+ if (st -> declaration == DECL_FUNCTION_TEMPLATE )
28492847 {
28502848 corkIndex = qualifyFunctionTag (st , st -> blockName );
28512849 }
@@ -2857,7 +2855,8 @@ static int tagCheck (statementInfo *const st)
28572855 /* D declaration templates */
28582856 if (isInputLanguage (Lang_d ) &&
28592857 (st -> declaration == DECL_CLASS || st -> declaration == DECL_STRUCT ||
2860- st -> declaration == DECL_INTERFACE || st -> declaration == DECL_UNION ))
2858+ st -> declaration == DECL_INTERFACE || st -> declaration == DECL_UNION ||
2859+ st -> declaration == DECL_TEMPLATE ))
28612860 corkIndex = qualifyBlockTag (st , prev2 );
28622861 else
28632862 {
You can’t perform that action at this time.
0 commit comments