Skip to content

Commit

Permalink
add regression test for 15550
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinNowak committed Jan 26, 2016
1 parent 3d385e4 commit e9c0e23
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/compilable/test15550.d
@@ -0,0 +1,13 @@
struct Vector(T, int N)
{
void opDispatch(string, U)(U)
{
}

void baz(string, U)(U)
{
}
}

static assert(!is(typeof(Vector!(int, 2)._isMatrix)));
static assert(!is(typeof(Vector!(int, 2).baz!"_isMatrix")));
27 changes: 27 additions & 0 deletions test/fail_compilation/fail15550.d
@@ -0,0 +1,27 @@
/*
TEST_OUTPUT:
---
fail_compilation/fail15550.d(25): Error: expression (foo!int) has no type
fail_compilation/fail15550.d(26): Error: expression (opDispatch!"_isMatrix") has no type
fail_compilation/fail15550.d(27): Error: expression (baz!"_isMatrix") has no type
---
*/

T foo(T, T2)(T2)
{
}

struct Vector
{
void opDispatch(string, U)(U)
{
}

void baz(string, U)(U)
{
}
}

alias T1 = typeof(foo!int);
alias T2 = typeof(Vector._isMatrix);
alias T3 = typeof(Vector.baz!"_isMatrix");

0 comments on commit e9c0e23

Please sign in to comment.