Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala
Original file line number Diff line number Diff line change
Expand Up @@ -716,8 +716,13 @@ class TreePickler(pickler: TastyPickler, attributes: Attributes) {
if passesConditionForErroringBestEffortCode(tree.hasType) then pickleType(tree.tpe)
else pickleErrorType()
case SingletonTypeTree(ref) =>
writeByte(SINGLETONtpt)
pickleTree(ref)
val tp = ref.tpe
val tp1 = tp.deskolemized
if tp1 ne tp then
pickleType(tp1)
else
writeByte(SINGLETONtpt)
pickleTree(ref)
case RefinedTypeTree(parent, refinements) =>
if (refinements.isEmpty) pickleTree(parent)
else {
Expand Down
14 changes: 14 additions & 0 deletions tests/pos/i23194.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
class R[T] extends annotation.StaticAnnotation

class A[T]:
val next: A[T] = null
val self: this.type = this
val selfnext: this.next.type = this.next
def f: (A[T] @R[this.type], A[T] @R[this.next.type]) = ???
def g: (A[T] @R[self.type], A[T] @R[selfnext.type]) = ???

class Test:
def test =
val (a, b) = A[String]().f
val (a2, b2) = A[String]().g

Loading