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
Correction for short function syntax, closes#356 (#359)
Current implementation does not work for the following code:
```cpp
main: () = {
:() = 1;
[[assert: 1]]
}
```
It fails with error:
```
error: subscript expression [ ] must not be empty (if you were trying to name a C-style array type, use 'std::array' instead) (at '[')
```
This change introduce small correction that moves back parsing
to semicolon (to simulate double semicolon) for short syntax.
It is not done in the following cases:
```cpp
:() = 1;(); // imediatelly called lambda
f(a,b,:() = 1;); // last argument in function call
f(a,:() = 1;,c); // first or in the middle argument
```
After this change the original issue is solved.
All regression tests pass. Closes#356
0 commit comments