Stanislav Gromov
Stanislav Gromov
It's an explicit default. If you want an implicit one with a tag override, you can enclose the expression into parentheses. ```Pawn return switch (value; 1: 2; (_:TaggedResult()) ); ```
> I'm not sure if the optional _: is in the latest version of the PR, but this code gives a staging buffer overflow Thanks. I'm already aware of this...
> How would this affect something like `{ Float, ...}`? I think this is already covered in #234: > Obviously that would require the tag of a variable to be...
Should I implement those warnings exactly as described? Would be nice to have any feedback before I get to implementing them.
Update: Added an idea for a new warning: > * **enum increment "%s" has no effect on zero value** > Might be useful if the user defined bit flags, but...
Added ideas for two new diagnostics: > * **variable "%s" used in loop condition not modified in loop body** > Detects situations when the user forgot to add an increment...
On the first pass the compiler analyzes the use of each variable. If a variable is unused, it's not given a distinct address (the address is kept the same as...
@Y-Less If you don't mind, I'll still try to experiment with forcing an extra pass and maybe make a PR if it doesn't break any code (or if it doesn't...
The problem has been fixed in #577, so we should probably close this issue. @pawn-lang @kristoisberg
> This doesn't: > > ``` > Float:[10]operator-(Float:a, Float:b) { } > main () { } > ``` This is because return array sizes are only valid in new-style function...