* fix #19882 Improve error message when instantiating generics that lack a type * Update tests/errmsgs/t19882.nim Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
This commit is contained in:
parent
c4ba4f06f8
commit
a302b26e0e
2 changed files with 12 additions and 1 deletions
10
tests/errmsgs/t19882.nim
Normal file
10
tests/errmsgs/t19882.nim
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
discard """
|
||||
errormsg: "cannot instantiate 'A[T, P]' inside of type definition: 'init'; Maybe generic arguments are missing?"
|
||||
"""
|
||||
type A[T,P] = object
|
||||
b:T
|
||||
c:P
|
||||
proc init(): ref A =
|
||||
new(result)
|
||||
var a = init()
|
||||
Loading…
Add table
Add a link
Reference in a new issue