summary refs log tree commit diff stats
path: root/compiler/semobjconstr.nim
diff options
context:
space:
mode:
authorZahary Karadjov <zahary@gmail.com>2020-04-01 03:33:32 +0300
committerAndreas Rumpf <rumpf_a@web.de>2020-04-01 19:38:44 +0200
commitbe95f8fdfac9ceb559f77b55630ca9e285fa9a2d (patch)
treec4819894e2f0fdf8a720795880ece26c8e5e5795 /compiler/semobjconstr.nim
parentce9a4ed124d798d0287a62e4700a32f1d15878c9 (diff)
downloadNim-be95f8fdfac9ceb559f77b55630ca9e285fa9a2d.tar.gz
Turn some of the errors back into warnings
Diffstat (limited to 'compiler/semobjconstr.nim')
-rw-r--r--compiler/semobjconstr.nim5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/semobjconstr.nim b/compiler/semobjconstr.nim
index eb0589601..eeec42900 100644
--- a/compiler/semobjconstr.nim
+++ b/compiler/semobjconstr.nim
@@ -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