summary refs log tree commit diff stats
path: root/tests/errmsgs
diff options
context:
space:
mode:
authormetagn <metagngn@gmail.com>2023-06-05 11:53:40 +0300
committerGitHub <noreply@github.com>2023-06-05 10:53:40 +0200
commit0a212f97a5dd4d5dd1ea84f370bd27abe55a818e (patch)
treecc44556eb8f56b15e2b3d06b17aba9a4b6890bb8 /tests/errmsgs
parentc7c3362cc818a660806d7247da51cd45d9660258 (diff)
downloadNim-0a212f97a5dd4d5dd1ea84f370bd27abe55a818e.tar.gz
properly disallow unresolved generic proc values (#22005)
* properly disallow unresolved generic proc values

* mirrors semoperand

* shallow efTypeAllowed, add back special case
Diffstat (limited to 'tests/errmsgs')
-rw-r--r--tests/errmsgs/tunresolvedinnerproc.nim10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/errmsgs/tunresolvedinnerproc.nim b/tests/errmsgs/tunresolvedinnerproc.nim
new file mode 100644
index 000000000..7655a5a41
--- /dev/null
+++ b/tests/errmsgs/tunresolvedinnerproc.nim
@@ -0,0 +1,10 @@
+proc wrap[T]() =
+  proc notConcrete[T](x, y: int): int =
+    var dummy: T
+    result = x - y
+
+  var x: proc (x, y: T): int
+  x = notConcrete #[tt.Error
+      ^ 'notConcrete' doesn't have a concrete type, due to unspecified generic parameters.]#
+
+wrap[int]()