diff options
author | Araq <rumpf_a@web.de> | 2014-02-01 11:56:21 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2014-02-01 11:56:21 +0100 |
commit | d8d93218fa509b8980d5ecb4b8af4e70e9f4926e (patch) | |
tree | 80459f33d262d13c5099339a1111e805bbb7ccd6 /compiler | |
parent | ad74332a9221b17db84de6eca55f19b67a3ec81f (diff) | |
download | Nim-d8d93218fa509b8980d5ecb4b8af4e70e9f4926e.tar.gz |
bugfix: object constructor doesn't allow 'distinct' types
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/semexprs.nim | 4 |
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 |