Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1665 from 9rnsr/fix9514
Issue 9514 - "template instance … is not an alias"
- Loading branch information
1 parent
df3d214
commit 0efbffd
Showing
6 changed files
with
71 additions
and
3 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
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
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
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,22 @@ | ||
// PERMUTE_ARGS: | ||
// REQUIRED_ARGS: -o- | ||
|
||
template TStructHelpers() | ||
{ | ||
void opEquals(Foo) | ||
{ | ||
auto n = FieldNames!(); | ||
} | ||
} | ||
|
||
struct Foo | ||
{ | ||
mixin TStructHelpers!(); | ||
} | ||
|
||
import imports.fwdref9514 : find; // selective import without aliasing | ||
|
||
template FieldNames() | ||
{ | ||
static if (find!`true`([1])) enum int FieldNames = 1; | ||
} |
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,22 @@ | ||
// PERMUTE_ARGS: | ||
// REQUIRED_ARGS: -o- | ||
|
||
template TStructHelpers() | ||
{ | ||
void opEquals(Foo) | ||
{ | ||
auto n = FieldNames!(); | ||
} | ||
} | ||
|
||
struct Foo | ||
{ | ||
mixin TStructHelpers!(); | ||
} | ||
|
||
import imports.fwdref9514 : foo = find; // selective import with aliasing | ||
|
||
template FieldNames() | ||
{ | ||
static if (foo!`true`([1])) enum int FieldNames = 1; | ||
} |
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,4 @@ | ||
bool find(alias pred, R)(R range) | ||
{ | ||
return true; | ||
} |