blob: 4526cb891d56aa62080fd8c9face1c2a11bb7e91 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
|
block: # issue #19849
type
Vec2[T] = object
x, y: T
Vec2i = Vec2[int]
template getX(p: Vec2i): int = p.x
let x = getX:
const t = Vec2i(x: 1, y: 2)
t
doAssert x == 1
|