Generic pointer procs now error if no types supplied (#18832)

* more precise logic for pointer procs

* added test for generic pointer procs

* Fixed generic getting bracket expr if erroring
This commit is contained in:
Jason Beetham 2021-09-11 14:20:22 -06:00 • committed by GitHub
commit 5d1608c976
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 30 additions and 2 deletions

View file

@ -1511,7 +1511,7 @@ proc maybeInstantiateGeneric(c: PContext, n: PNode, s: PSym): PNode =
else:
result = explicitGenericInstantiation(c, n, s)
if result == n:
n[0] = copyTree(result)
n[0] = copyTree(result[0])
else:
n[0] = result