summary refs log tree commit diff stats
path: root/compiler/semstmts.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/semstmts.nim')
-rw-r--r--compiler/semstmts.nim8
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim
index f8ad1ff9e..b63c20548 100644
--- a/compiler/semstmts.nim
+++ b/compiler/semstmts.nim
@@ -89,9 +89,11 @@ proc semDestructorCheck(c: PContext, n: PNode, flags: TExprFlags) {.inline.} =
     if instantiateDestructor(c, n.typ):
       LocalError(n.info, errGenerated,
         "usage of a type with a destructor in a non destructible context")
-  if efDetermineType notin flags and n.typ.kind == tyTypeDesc and 
-      c.p.owner.kind notin {skTemplate, skMacro}:
-    localError(n.info, errGenerated, "value expected, but got a type")
+  # This still breaks too many things:
+  when false:
+    if efDetermineType notin flags and n.typ.kind == tyTypeDesc and 
+        c.p.owner.kind notin {skTemplate, skMacro}:
+      localError(n.info, errGenerated, "value expected, but got a type")
 
 proc newDeref(n: PNode): PNode {.inline.} =  
   result = newNodeIT(nkHiddenDeref, n.info, n.typ.sons[0])