Commit f50639e
committed
Add diagnostics for type alias to a wildcard, closes #357
In the current implementation of cppfront (f83ca9) the following code:
```cpp
alias5: type == _;
alias6: type == auto;
```
Generates succesfuly:
```cpp
using alias5 = auto;
using alias6 = auto;
```
Which is invalid cpp1 code.
After this change the alias to wildcard will generate the following error:
```
error: a 'type ==' alias declaration must be followed by a type name (not a wildcard _ nor auto)
```
All regression tests pass. Closes #3571 parent f83ca9b commit f50639e
1 file changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5484 | 5484 | | |
5485 | 5485 | | |
5486 | 5486 | | |
| 5487 | + | |
| 5488 | + | |
| 5489 | + | |
| 5490 | + | |
| 5491 | + | |
| 5492 | + | |
| 5493 | + | |
| 5494 | + | |
| 5495 | + | |
| 5496 | + | |
5487 | 5497 | | |
5488 | 5498 | | |
5489 | 5499 | | |
| |||
0 commit comments