mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 18:02:05 +00:00
26 lines
356 B
Nim
26 lines
356 B
Nim
discard """
|
|
line: 24
|
|
errormsg: "expression expected, but found 'keyword else'"
|
|
"""
|
|
|
|
import macros
|
|
|
|
# finally optional indentation in 'if' expressions :-):
|
|
var x = if 4 != 5:
|
|
"yes"
|
|
else:
|
|
"no"
|
|
|
|
macro mymacro(n): untyped {.immediate.} =
|
|
discard
|
|
|
|
mymacro:
|
|
echo "test"
|
|
else:
|
|
echo "else part"
|
|
|
|
if 4 == 3:
|
|
echo "bug"
|
|
else:
|
|
echo "no bug"
|