blob: 7df3143c93add4732f4f5f1693c077bc9e4d8087 (
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()
|