diff options
author | Araq <rumpf_a@web.de> | 2015-03-22 10:47:07 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-03-22 10:47:07 +0100 |
commit | e7d709791942480cc60afc5e34ec75ec26402b9e (patch) | |
tree | 24ca24ec93c0e1ba8a97bb826d19044848eecd90 | |
parent | 36acac3000b496756ae3fbf561e875a1f9570bac (diff) | |
download | Nim-e7d709791942480cc60afc5e34ec75ec26402b9e.tar.gz |
fixes #1787
-rw-r--r-- | compiler/types.nim | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/types.nim b/compiler/types.nim index 0d91d1327..f4ac4daea 100644 --- a/compiler/types.nim +++ b/compiler/types.nim @@ -1092,9 +1092,11 @@ proc typeAllowedAux(marker: var IntSet, typ: PType, kind: TSymKind, if result != nil: break if result.isNil and t.sons[0] != nil: result = typeAllowedAux(marker, t.sons[0], skResult, flags) - of tyExpr, tyStmt, tyTypeDesc, tyStatic: + of tyTypeDesc: + # XXX: This is still a horrible idea... result = nil - # XXX er ... no? these should not be allowed! + of tyExpr, tyStmt, tyStatic: + if kind notin {skParam, skResult}: result = t of tyEmpty: if taField notin flags: result = t of tyTypeClasses: |