mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-13 06:43:52 +00:00
@@ -498,7 +498,7 @@ proc semVarOrLet(c: PContext, n: PNode, symkind: TSymKind): PNode =
|
||||
def = fitNode(c, typ, def, def.info)
|
||||
#changeType(def.skipConv, typ, check=true)
|
||||
else:
|
||||
typ = skipIntLit(def.typ)
|
||||
typ = def.typ.skipTypes({tyStatic}).skipIntLit
|
||||
if typ.kind in tyUserTypeClasses and typ.isResolvedUserTypeClass:
|
||||
typ = typ.lastSon
|
||||
if hasEmpty(typ):
|
||||
|
||||
12
tests/generics/t3977.nim
Normal file
12
tests/generics/t3977.nim
Normal file
@@ -0,0 +1,12 @@
|
||||
discard """
|
||||
output: '''42'''
|
||||
"""
|
||||
|
||||
type
|
||||
Foo[N: static[int]] = object
|
||||
|
||||
proc foo[N](x: Foo[N]) =
|
||||
echo N
|
||||
|
||||
var f1: Foo[42]
|
||||
f1.foo
|
||||
Reference in New Issue
Block a user