You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error: java.lang.Error: unexpected alias type:typeScopedTaskKey
at scala.tools.nsc.symtab.SymbolTable.abort(SymbolTable.scala:35)
at scala.tools.nsc.symtab.Symbols$$Symbol.existentialBound(Symbols.scala:970)
at scala.tools.nsc.typechecker.Typers$$Typer$$$$anonfun$$39.apply(Typers.scala:2743)
at scala.tools.nsc.typechecker.Typers$$Typer$$$$anonfun$$39.apply(Typers.scala:2738)
at scala.collection.TraversableLike$$$$anonfun$$map$$1.apply(TraversableLike.scala:241)
at scala.collection.TraversableLike$$$$anonfun$$map$$1.apply(TraversableLike.scala:241)
at scala.collection.LinearSeqOptimized$$class.foreach(LinearSeqOptimized.scala:61)
at scala.collection.immutable.List.foreach(List.scala:45)
at scala.collection.TraversableLike$$class.map(TraversableLike.scala:241)
at scala.collection.immutable.List.map(List.scala:45)
at scala.tools.nsc.typechecker.Typers$$Typer.existentialTransform(Typers.scala:2738)
at scala.tools.nsc.typechecker.Typers$$Typer.packSymbols(Typers.scala:2763)
at scala.tools.nsc.typechecker.Typers$$Typer$$checkNoEscaping$$.check(Typers.scala:354)
at scala.tools.nsc.typechecker.Typers$$Typer$$checkNoEscaping$$.locals(Typers.scala:341)
at scala.tools.nsc.typechecker.Typers$$Typer.typedDefDef(Typers.scala:1690)
at scala.tools.nsc.typechecker.Typers$$Typer.typed1(Typers.scala:3807)
If stToSK is not private, we can see the potential issue it is investigating when it crashes.
0304.scala:9:error: privatetypeScopedTaskKey escapes its defining scope as part of typeBop[Foo.ScopedTaskKey]
valstToSK=newBop[ScopedTaskKey]
^
one error found
It compiles in 2.8.1, fails with r24371.
The text was updated successfully, but these errors were encountered:
@adriaanm said:
as in [#SI-4559], this requires clarification of expected behaviour for avoiding escaping symbols
I'd say checkNoEscape(sym) should not have to be called when sym.isAliasType, since normalisation could be used to chase away type aliases (private or otherwise) -- in principle, we only need to check the normalisation. The problem here arises due to a private type constructor alias, which requires eta-expansion to normalise. Eta-expansion yields a polytype, which is not directly expressible in the surface syntax (unless the alias was applied to its type arguments).
This issue shows that we currently use dealias instead of normalize, hence the need for a type constructor to trigger the problem: these have to be eta-expanded. The argument from [#SI-4559] remains the same, in principle, but it depends on the spec...
This appears specific to higher kinded types.
If stToSK is not private, we can see the potential issue it is investigating when it crashes.
It compiles in 2.8.1, fails with r24371.
The text was updated successfully, but these errors were encountered: