Skip to content

Commit

Permalink
Merge pull request #3901 from 9rnsr/fix13353
Browse files Browse the repository at this point in the history
[REG2.066] Issue 13353 - [ICE] assertion with is() and templated interface
  • Loading branch information
yebblies authored and 9rnsr committed Aug 26, 2014
1 parent 8b6765c commit b8a96f9
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/class.c
Expand Up @@ -1359,6 +1359,14 @@ void InterfaceDeclaration::semantic(Scope *sc)
i++;
}

if (doAncestorsSemantic == SemanticDone)
{
//printf("%s already semantic analyzed, semanticRun = %d\n", toChars(), semanticRun);
if (semanticRun >= PASSsemanticdone)
return;
goto Lancestorsdone;
}

if (!baseclasses->dim && sc->linkage == LINKcpp)
cpp = true;

Expand Down Expand Up @@ -1443,6 +1451,7 @@ void InterfaceDeclaration::semantic(Scope *sc)
cpp = true;
}
}
Lancestorsdone:

if (!members) // if opaque declaration
{
Expand Down
18 changes: 18 additions & 0 deletions test/runnable/testclass.d
Expand Up @@ -38,6 +38,24 @@ class Type12143 : Node12143 {}

class Class12143 : Type12143 {}

/***************************************************/
// 13353

interface Base13353(T)
{
static assert(is(T : Base13353!T));
}

interface Derived13353 : Base13353!Derived13353
{
void func();
}

class Concrete13353 : Derived13353
{
void func() {}
}

/***************************************************/

int main()
Expand Down

0 comments on commit b8a96f9

Please sign in to comment.