Turn some of the errors back into warnings

This commit is contained in:
Zahary Karadjov 2020-04-01 03:33:32 +03:00 • committed by Andreas Rumpf
commit be95f8fdfa
7 changed files with 63 additions and 33 deletions

View file

@ -336,6 +336,11 @@ proc semConstructTypeAux(c: PContext,
let base = t[0]
if base == nil: break
t = skipTypes(base, skipPtrs)
if t.kind == tyGenericParam:
# XXX: This is not supposed to happen, but apparently
# there are some issues in semtypinst. Luckily, it
# seems to affect only `computeRequiresInit`.
return
constrCtx.needsFullInit = constrCtx.needsFullInit or
tfNeedsFullInit in t.flags