diff options
author | Bung <crc32@qq.com> | 2022-09-22 09:11:39 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-21 21:11:39 -0400 |
commit | 2afce84616e1de176c9e76a3e0146fff7ab1de10 (patch) | |
tree | 88b23bb12ca6603a7e7679b487983f0ec5a9b536 /tests | |
parent | de089d7fdb48a25069c3716ba00774b60c3da370 (diff) | |
download | Nim-2afce84616e1de176c9e76a3e0146fff7ab1de10.tar.gz |
Improve error message when instantiating generics with object constructor (#20358)
* Improve error message when instantiating generics with object constructor * follow suggestion * Update compiler/semobjconstr.nim Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com> * Update tests/errmsgs/t19882_2.nim Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/errmsgs/t19882_2.nim | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/errmsgs/t19882_2.nim b/tests/errmsgs/t19882_2.nim new file mode 100644 index 000000000..7f3055a5d --- /dev/null +++ b/tests/errmsgs/t19882_2.nim @@ -0,0 +1,5 @@ +discard """ + errormsg: "cannot instantiate: 'A[T]'; the object's generic parameters cannot be inferred and must be explicitly given" +""" +type A[T] = object +var a = A() \ No newline at end of file |