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 #3732 from 9rnsr/fix13081
[REG2.066a] Issue 13081 - ICE with alias this and opSlice
- Loading branch information
Showing
2 changed files
with
51 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
TEST_OUTPUT: | ||
--- | ||
fail_compilation/ice13081.d(17): Error: undefined identifier node | ||
fail_compilation/ice13081.d(17): Error: undefined identifier data | ||
fail_compilation/ice13081.d(17): Error: undefined identifier node | ||
fail_compilation/ice13081.d(28): Error: template instance ice13081.Cube!(SparseDataStore) error instantiating | ||
--- | ||
*/ | ||
|
||
struct Cube(StorageT) | ||
{ | ||
StorageT datastore; | ||
alias datastore this; | ||
auto seed() | ||
{ | ||
this[] = node.data ? data : node.data; | ||
} | ||
} | ||
|
||
class SparseDataStore | ||
{ | ||
auto opSlice() {} | ||
} | ||
|
||
void main() | ||
{ | ||
Cube!SparseDataStore c; | ||
} |