diff options
author | metagn <metagngn@gmail.com> | 2023-06-05 11:53:40 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-05 10:53:40 +0200 |
commit | 0a212f97a5dd4d5dd1ea84f370bd27abe55a818e (patch) | |
tree | cc44556eb8f56b15e2b3d06b17aba9a4b6890bb8 /tests/errmsgs | |
parent | c7c3362cc818a660806d7247da51cd45d9660258 (diff) | |
download | Nim-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.nim | 10 |
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]() |