File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ discard """
2+ cmd: '''nim check --hints:off $file'''
3+ action: reject
4+ nimout: '''
5+ tundeclared_field.nim(25, 12) Error: undeclared field: 'bad' for type tundeclared_field.A [type declared in tundeclared_field.nim(22, 8)]
6+ tundeclared_field.nim(30, 16) Error: undeclared field: 'bad' for type tundeclared_field.A [type declared in tundeclared_field.nim(28, 8)]
7+ tundeclared_field.nim(36, 4) Error: undeclared field: 'bad' for type tundeclared_field.A [type declared in tundeclared_field.nim(33, 8)]
8+ tundeclared_field.nim(40, 13) Error: cannot instantiate Foo [type declared in tundeclared_field.nim(39, 8)]
9+ '''
10+ """
11+
12+
13+
14+
15+
16+
17+
18+
19+
20+ # line 20
21+ block :
22+ type A = object
23+ a0: int
24+ var a: A
25+ discard a.bad
26+
27+ block :
28+ type A = object
29+ a0: int
30+ var a = A (bad: 0 )
31+
32+ block :
33+ type A = object
34+ a0: int
35+ var a: A
36+ a.bad = 0
37+
38+ block :
39+ type Foo [T: SomeInteger ] = object
40+ var a: Foo [float ]
You can’t perform that action at this time.
0 commit comments