File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -434,7 +434,8 @@ abstract class UnusedStorageCheck : UnusedIdentifierCheck
434434 // enum name = "abc";
435435 // __traits(hasMember, S, name);
436436 ignoreDeclarations++ ;
437- traitsExp.templateArgumentList.accept(this );
437+ if (traitsExp.templateArgumentList)
438+ traitsExp.templateArgumentList.accept(this );
438439 ignoreDeclarations-- ;
439440 }
440441
Original file line number Diff line number Diff line change @@ -117,6 +117,12 @@ final class UnusedVariableCheck : UnusedStorageCheck
117117 __traits (compiles , { int i = 2 ; });
118118 }
119119
120+ // segfault with null templateArgumentList
121+ void nullTest ()
122+ {
123+ __traits (isPOD );
124+ }
125+
120126 }c, sac);
121127 stderr.writeln(" Unittest for UnusedVariableCheck passed." );
122128}
You can’t perform that action at this time.
0 commit comments