mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 05:50:30 +00:00
@@ -1146,7 +1146,7 @@ proc isExprStart(p: Parser): bool =
|
||||
of tkSymbol, tkAccent, tkOpr, tkNot, tkNil, tkCast, tkIf, tkFor,
|
||||
tkProc, tkFunc, tkIterator, tkBind, tkBuiltInMagics,
|
||||
tkParLe, tkBracketLe, tkCurlyLe, tkIntLit..tkCustomLit, tkVar, tkRef, tkPtr,
|
||||
tkTuple, tkObject, tkWhen, tkCase, tkOut:
|
||||
tkTuple, tkObject, tkWhen, tkCase, tkOut, tkTry, tkBlock:
|
||||
result = true
|
||||
else: result = false
|
||||
|
||||
|
||||
9
tests/parser/t12274.nim
Normal file
9
tests/parser/t12274.nim
Normal file
@@ -0,0 +1,9 @@
|
||||
var s: seq[int]
|
||||
s.add block:
|
||||
let i = 1
|
||||
i
|
||||
s.add try:
|
||||
2
|
||||
except:
|
||||
3
|
||||
doAssert s == @[1, 2]
|
||||
Reference in New Issue
Block a user