blob: 9eabb75259b474634e4f2aa7f7fc2b448a635710 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
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()
|