summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-02-01 11:56:21 +0100
committerAraq <rumpf_a@web.de>2014-02-01 11:56:21 +0100
commitd8d93218fa509b8980d5ecb4b8af4e70e9f4926e (patch)
tree80459f33d262d13c5099339a1111e805bbb7ccd6 /compiler
parentad74332a9221b17db84de6eca55f19b67a3ec81f (diff)
downloadNim-d8d93218fa509b8980d5ecb4b8af4e70e9f4926e.tar.gz
bugfix: object constructor doesn't allow 'distinct' types
Diffstat (limited to 'compiler')
-rw-r--r--compiler/semexprs.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim
index 6e2d777fb..432443dc6 100644
--- a/compiler/semexprs.nim
+++ b/compiler/semexprs.nim
@@ -1709,8 +1709,8 @@ proc semObjConstr(c: PContext, n: PNode, flags: TExprFlags): PNode =
   result = n
   result.typ = t
   result.kind = nkObjConstr
-  t = skipTypes(t, abstractInst)
-  if t.kind == tyRef: t = skipTypes(t.sons[0], abstractInst)
+  t = skipTypes(t, {tyGenericInst})
+  if t.kind == tyRef: t = skipTypes(t.sons[0], {tyGenericInst})
   if t.kind != tyObject:
     localError(n.info, errGenerated, "object constructor needs an object type")
     return