You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add diagnostics for using auto as a type of variable and as function return type (#348)
* Add diagnostics for using auto as function return type
While parsing following code:
```cpp
f: () -> auto = 42;
```
Rise an error with the following diagnostics:
```
error: to define a function f with deduced return type, write 'f : ( /* arguments */ ) -> _ = { /* function body */ }'
```
* Add diagnostics for using auto as a type of variable
While parsing the following code:
```cpp
i : auto = 42;
```
Rise an error with the following diagnostics:
```
error: to define a variable i with deduced type, write 'i := /* initializer */;'
```
0 commit comments