| 1 |
/* |
| 2 |
TEST_OUTPUT: |
| 3 |
--- |
| 4 |
fail_compilation/ice15922.d(23): Error: function `ice15922.ValidSparseDataStore!int.ValidSparseDataStore.correctedInsert!false.correctedInsert` has no `return` statement, but is expected to return a value of type `int` |
| 5 |
fail_compilation/ice15922.d(21): Error: template instance `ice15922.ValidSparseDataStore!int.ValidSparseDataStore.correctedInsert!false` error instantiating |
| 6 |
fail_compilation/ice15922.d(26): instantiated from here: `ValidSparseDataStore!int` |
| 7 |
fail_compilation/ice15922.d(14): Error: calling non-static function `insert` requires an instance of type `ValidSparseDataStore` |
| 8 |
fail_compilation/ice15922.d(26): Error: template instance `ice15922.StorageAttributes!(ValidSparseDataStore!int)` error instantiating |
| 9 |
--- |
| 10 |
*/ |
| 11 |
|
| 12 |
template StorageAttributes(Store) |
| 13 |
{ |
| 14 |
enum hasInsertMethod = Store.insert; |
| 15 |
enum hasFullSlice = Store.init[]; |
| 16 |
} |
| 17 |
struct ValidSparseDataStore(DataT) |
| 18 |
{ |
| 19 |
DataT insert() |
| 20 |
{ |
| 21 |
correctedInsert!(false); |
| 22 |
} |
| 23 |
DataT correctedInsert(bool CorrectParents)() {} |
| 24 |
auto opSlice() inout {} |
| 25 |
} |
| 26 |
alias BasicCubeT = StorageAttributes!(ValidSparseDataStore!int); |