Skip to content

Commit 190c672

Browse files
committed
Merge pull request scala#3980 from retronym/ticket/8844
SI-8844 Fix regression with existentials + type aliases
2 parents 223e207 + a8a31e9 commit 190c672

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/reflect/scala/reflect/internal/Types.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2605,7 +2605,7 @@ trait Types
26052605
// derived from the existentially quantified type into the typing environment
26062606
// (aka \Gamma, which tracks types for variables and constraints/kinds for types)
26072607
// as a nice bonus, delaying this until we need it avoids cyclic errors
2608-
def tpars = underlying.typeSymbol.initialize.typeParams
2608+
def tpars = underlying.typeSymbolDirect.initialize.typeParams
26092609

26102610
def newSkolem(quant: Symbol) = owner.newExistentialSkolem(quant, origin)
26112611
def newSharpenedSkolem(quant: Symbol, tparam: Symbol): Symbol = {

test/files/pos/t8844.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
object Example {
2+
type S[A] = String
3+
def foo(s: S[_]): String = s
4+
}

0 commit comments

Comments
 (0)