mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-05 20:47:53 +00:00
* 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>
11 lines
221 B
Nim
11 lines
221 B
Nim
|
|
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()
|