include generic bodies in allowMetaTypes (#23968)

fixes #19848

Not sure why this wasn't the case already. The `if cl.allowMetaTypes:
return` line below for `tyFromExpr` [was added 10 years
ago](d5798b43de).
Hopefully it was just negligence?

(cherry picked from commit 1befb8d4a3)
This commit is contained in:
metagn
2024-08-20 17:20:35 +03:00
committed by narimiran
parent 009a5b0684
commit ba516c8eb5
2 changed files with 18 additions and 1 deletions

16
tests/generics/t19848.nim Normal file
View File

@@ -0,0 +1,16 @@
discard """
output: '''
todo
'''
"""
type
Maybe[T] = object
List[T] = object
proc dump[M: Maybe](a: List[M]) =
echo "todo"
var a: List[Maybe[int]]
dump(a)