diff options
Diffstat (limited to 'tests/parser/tletcolon.nim')
-rw-r--r-- | tests/parser/tletcolon.nim | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/parser/tletcolon.nim b/tests/parser/tletcolon.nim index eab7a8edd..7eaa5e3e5 100644 --- a/tests/parser/tletcolon.nim +++ b/tests/parser/tletcolon.nim @@ -4,7 +4,8 @@ discard """ 44 3 more body code yes -yes''' +yes +block expression works''' """ template x(body): untyped = @@ -50,3 +51,11 @@ let format = else: echo "Texture Format Unknown, assuming RGB" #This echo causes an error TextureInternalFormat.RGB + +# Block as expressions #3827 +block: + let x = block: + var y = 2 + echo "block expression works" + y*y + doAssert x == 4 \ No newline at end of file |