fix #18990 Regression in proc symbol resolution; Error: attempting to… (#20554)

fix #18990 Regression in proc symbol resolution; Error: attempting to call routine
This commit is contained in:
Bung 2022-10-13 08:44:45 +08:00 • committed by GitHub
commit ea2f2775a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 2 deletions

2
tests/constr/a.nim Normal file
View file

@ -0,0 +1,2 @@
type A* = object
a: uint8

2
tests/constr/b.nim Normal file
View file

@ -0,0 +1,2 @@
type B* = object
proc A*(a, b: float): B = discard

3
tests/constr/t18990.nim Normal file
View file

@ -0,0 +1,3 @@
import a, b
discard A(1f, 1f) # works
proc x(b = A(1f, 1f)) = discard # doesn't work