disallow static in return type (#9686) [nobackport]
This commit is contained in:
parent
42e83ac24c
commit
ce148e71ef
3 changed files with 16 additions and 1 deletions
|
|
@ -1238,7 +1238,9 @@ proc typeAllowedAux(marker: var IntSet, typ: PType, kind: TSymKind,
|
|||
of tyTypeDesc:
|
||||
# XXX: This is still a horrible idea...
|
||||
result = nil
|
||||
of tyUntyped, tyTyped, tyStatic:
|
||||
of tyStatic:
|
||||
if kind notin {skParam}: result = t
|
||||
of tyUntyped, tyTyped:
|
||||
if kind notin {skParam, skResult}: result = t
|
||||
of tyVoid:
|
||||
if taField notin flags: result = t
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue