parent
a2b2bc1a36
commit
2c98b4943e
2 changed files with 10 additions and 1 deletions
|
|
@ -873,7 +873,7 @@ proc liftParamType(c: PContext, procKind: TSymKind, genericParams: PNode,
|
||||||
if base.isMetaType and procKind == skMacro:
|
if base.isMetaType and procKind == skMacro:
|
||||||
localError(c.config, info, errMacroBodyDependsOnGenericTypes % paramName)
|
localError(c.config, info, errMacroBodyDependsOnGenericTypes % paramName)
|
||||||
result = addImplicitGeneric(c.newTypeWithSons(tyStatic, @[base]))
|
result = addImplicitGeneric(c.newTypeWithSons(tyStatic, @[base]))
|
||||||
result.flags.incl({tfHasStatic, tfUnresolved})
|
if result != nil: result.flags.incl({tfHasStatic, tfUnresolved})
|
||||||
|
|
||||||
of tyTypeDesc:
|
of tyTypeDesc:
|
||||||
if tfUnresolved notin paramType.flags:
|
if tfUnresolved notin paramType.flags:
|
||||||
|
|
|
||||||
|
|
@ -107,3 +107,12 @@ when true:
|
||||||
assert aw2.data.high == 6
|
assert aw2.data.high == 6
|
||||||
assert aw3.data.high == 9
|
assert aw3.data.high == 9
|
||||||
|
|
||||||
|
# #6077
|
||||||
|
block:
|
||||||
|
type
|
||||||
|
Backend = enum
|
||||||
|
Cpu
|
||||||
|
|
||||||
|
Tensor[B: static[Backend]; T] = object
|
||||||
|
|
||||||
|
BackProp[B: static[Backend],T] = proc (gradient: Tensor[B,T]): Tensor[B,T]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue