Add test for issue #1946

This commit is contained in:
Audun Wilhelmsen
2015-01-16 22:31:43 +01:00
parent c7934be7e8
commit f25c47db1a

14
tests/vm/tldconst.nim Normal file
View File

@@ -0,0 +1,14 @@
# Passes if it compiles
# From issue #1946
type
Part = object
index: int ## array index of argument to be accessed
proc foobar(): int =
var x: Part
if x.index < high(int):
discard
0
const x = foobar()