diff options
author | Bung <crc32@qq.com> | 2022-10-13 08:44:45 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-12 20:44:45 -0400 |
commit | ea2f2775a7398c135408d8b7a444f8337f26ac89 (patch) | |
tree | 967142a5f558d60be96677f5b157be8f2ce7fb34 /tests/constr | |
parent | fa60378a7f992235efd766d656556a3e1e337008 (diff) | |
download | Nim-ea2f2775a7398c135408d8b7a444f8337f26ac89.tar.gz |
fix #18990 Regression in proc symbol resolution; Error: attempting to… (#20554)
fix #18990 Regression in proc symbol resolution; Error: attempting to call routine
Diffstat (limited to 'tests/constr')
-rw-r--r-- | tests/constr/a.nim | 2 | ||||
-rw-r--r-- | tests/constr/b.nim | 2 | ||||
-rw-r--r-- | tests/constr/t18990.nim | 3 |
3 files changed, 7 insertions, 0 deletions
diff --git a/tests/constr/a.nim b/tests/constr/a.nim new file mode 100644 index 000000000..03788fc57 --- /dev/null +++ b/tests/constr/a.nim @@ -0,0 +1,2 @@ +type A* = object + a: uint8 \ No newline at end of file diff --git a/tests/constr/b.nim b/tests/constr/b.nim new file mode 100644 index 000000000..437dd0550 --- /dev/null +++ b/tests/constr/b.nim @@ -0,0 +1,2 @@ +type B* = object +proc A*(a, b: float): B = discard \ No newline at end of file diff --git a/tests/constr/t18990.nim b/tests/constr/t18990.nim new file mode 100644 index 000000000..2f60f3c2c --- /dev/null +++ b/tests/constr/t18990.nim @@ -0,0 +1,3 @@ +import a, b +discard A(1f, 1f) # works +proc x(b = A(1f, 1f)) = discard # doesn't work \ No newline at end of file |