mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 01:14:41 +00:00
15 lines
230 B
Nim
15 lines
230 B
Nim
# 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()
|