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
funcfoo: bool=trueconst bar =block:
type T =intnotfoo()
echo$bar
Nim Version
% nim -v
Nim Compiler Version 2.0.5 [MacOSX: amd64]
Compiled at 2024-05-03
Copyright (c) 2006-2023 by Andreas Rumpf
git hash: fcb8461efab2ef7bdd976f82af8c7d1390f502ac
active boot switches: -d:release
% nim -v
Nim Compiler Version 1.6.20 [MacOSX: amd64]
Compiled at 2024-04-29
Copyright (c) 2006-2023 by Andreas Rumpf
git hash: 19fdbfc173bfccb64cb64e0a963e69f52f71fc73
active boot switches: -d:release
Current Output
Error: Invalid syntax. When used with a type, 'not' can be followed only by 'nil'
Expected Output
false
Possible Solution
Do the not portion in a separate step, or put the T definition outside the block (not always possible, e.g., if when is inside block and T only works inside when).
Additional Information
No response
The text was updated successfully, but these errors were encountered:
Description
Nim Version
Current Output
Expected Output
Possible Solution
Do the
not
portion in a separate step, or put theT
definition outside theblock
(not always possible, e.g., ifwhen
is insideblock
andT
only works insidewhen
).Additional Information
No response
The text was updated successfully, but these errors were encountered: