revert the bugfix for #11747 as it really was a new, poorly though-out feature

This commit is contained in:
Araq
2019-07-19 19:32:13 +02:00
parent 5a020d641d
commit 1868cbc449
2 changed files with 1 additions and 4 deletions

View File

@@ -1414,9 +1414,6 @@ proc semDeref(c: PContext, n: PNode): PNode =
var t = skipTypes(n.sons[0].typ, {tyGenericInst, tyVar, tyLent, tyAlias, tySink, tyOwned})
case t.kind
of tyRef, tyPtr: n.typ = t.lastSon
of tyTypeDesc:
# typeof(x[]) is still a typedesc:
n.typ = makeTypeDesc(c, t.lastSon.lastSon)
else: result = nil
#GlobalError(n.sons[0].info, errCircumNeedsPointer)

View File

@@ -40,4 +40,4 @@ type
MyRefType = ref MyType
echo sizeof(MyRefType[])
echo sizeof(default(MyRefType)[])