Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3d385e4
commit e9c0e23
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"); |