Skip to content

Commit

Permalink
Disable type simplify in unpickler
Browse files Browse the repository at this point in the history
  • Loading branch information
noti0na1 committed Feb 16, 2022
1 parent 8f99dad commit 90aa58a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
2 changes: 0 additions & 2 deletions compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1297,8 +1297,6 @@ class TreeUnpickler(reader: TastyReader,
}

val tree = if (tag < firstLengthTreeTag) readSimpleTerm() else readLengthTerm()
if (!tree.isInstanceOf[TypTree]) // FIXME: Necessary to avoid self-type cyclic reference in tasty_tools
tree.overwriteType(tree.tpe.simplified)
setSpan(start, tree)
}

Expand Down
15 changes: 15 additions & 0 deletions tests/pos/pickleSkelom.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
class A

type B = A

def f[T](x: T): x.type & T = ???

def g = {
var a: B = ???
f[A](a)
}

def testNN = {
var s: String = ???
x.nn
}

0 comments on commit 90aa58a

Please sign in to comment.