Skip to content

Commit

Permalink
fix diagnostic for failed IFTI
Browse files Browse the repository at this point in the history
  • Loading branch information
9rnsr committed Feb 1, 2016
1 parent f1042c4 commit 90cf474
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
9 changes: 7 additions & 2 deletions src/dtemplate.d
Expand Up @@ -2435,7 +2435,7 @@ extern (C++) void functionResolve(Match* m, Dsymbol dstart, Loc loc, Scope* sc,

Dsymbol s = ti.inst.toAlias();
FuncDeclaration fd;
if (TemplateDeclaration tdx = s.isTemplateDeclaration())
if (auto tdx = s.isTemplateDeclaration())
{
Objects dedtypesX; // empty tiargs

Expand Down Expand Up @@ -2482,7 +2482,12 @@ extern (C++) void functionResolve(Match* m, Dsymbol dstart, Loc loc, Scope* sc,
return 0;

if (fd.type.ty != Tfunction)
goto Lerror;
{
m.lastf = fd; // to propagate "error match"
m.count = 1;
m.last = MATCHnomatch;
return 1;
}

Type tthis_fd = fd.needThis() && !fd.isCtorDeclaration() ? tthis : null;

Expand Down
6 changes: 2 additions & 4 deletions test/fail_compilation/ice11850.d
@@ -1,14 +1,12 @@
/*
TEST_OUTPUT:
---
fail_compilation/ice11850.d(16): Error: incompatible types for ((a) < ([0])): 'uint[]' and 'int[]'
fail_compilation/ice11850.d(14): Error: incompatible types for ((a) < ([0])): 'uint[]' and 'int[]'
fail_compilation/imports/a11850.d(9): instantiated from here: FilterResult!(__lambda1, uint[][])
fail_compilation/ice11850.d(16): instantiated from here: filter!(uint[][])
fail_compilation/ice11850.d(14): instantiated from here: filter!(uint[][])
---
*/



import imports.a11850 : filter;

void main()
Expand Down

0 comments on commit 90cf474

Please sign in to comment.