summary refs log tree commit diff stats
path: root/compiler/semtypinst.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2012-04-21 03:22:53 +0200
committerAraq <rumpf_a@web.de>2012-04-21 03:22:53 +0200
commit7511a05b27e919c61703fea31f8d6d99cb2eae05 (patch)
tree083742a578b22765a324899b9644cedb87298a18 /compiler/semtypinst.nim
parent4aba7421f57d0f653ef928f012982957404416f9 (diff)
parenta05f0aa6b5d80bb10e1a854b60ed0af6e9f6f234 (diff)
downloadNim-7511a05b27e919c61703fea31f8d6d99cb2eae05.tar.gz
resolved conflict for news.txt
Diffstat (limited to 'compiler/semtypinst.nim')
-rwxr-xr-xcompiler/semtypinst.nim6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/semtypinst.nim b/compiler/semtypinst.nim
index 0c44205de..bfd706bea 100755
--- a/compiler/semtypinst.nim
+++ b/compiler/semtypinst.nim
@@ -17,8 +17,10 @@ proc checkPartialConstructedType(info: TLineInfo, t: PType) =
   elif t.kind == tyVar and t.sons[0].kind == tyVar:
     LocalError(info, errVarVarTypeNotAllowed)
 
-proc checkConstructedType*(info: TLineInfo, t: PType) = 
-  if tfAcyclic in t.flags and skipTypes(t, abstractInst).kind != tyObject: 
+proc checkConstructedType*(info: TLineInfo, typ: PType) = 
+  var t = typ.skipTypes({tyDistinct})
+  if t.kind in {tyTypeClass}: nil
+  elif tfAcyclic in t.flags and skipTypes(t, abstractInst).kind != tyObject: 
     LocalError(info, errInvalidPragmaX, "acyclic")
   elif t.kind == tyVar and t.sons[0].kind == tyVar: 
     LocalError(info, errVarVarTypeNotAllowed)