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
20:37~/Projects/Master/sandbox (master)$ cat Test.scala
importscala.reflect.runtime.universe._objectTestextendsApp {
deffoo(s: Symbol) =???deffoo(ts: TermSymbol) =???
}
20:37~/Projects/Master/sandbox (master)$ scalac Test.scala
Test.scala:5:error: double definition:
deffoo(s: reflect.runtime.universe.Symbol):Nothing at line 4 and
deffoo(ts: reflect.runtime.universe.TermSymbol):Nothing at line 5
have same typeaftererasure: (s: scala.reflect.api.Symbols#SymbolApi)Nothingdeffoo(ts: TermSymbol) =???^
one error found
The text was updated successfully, but these errors were encountered:
If one thinks about it, it's clear why TermSymbol erases to SymbolApi. Symbol is the first component of a compound type, and it erases to SymbolApi.
I'll change TermSymbol to say <: TermSymbolApi with Symbol, but in the meanwhile we could think why not scan other components of compound types looking for a base class that refines the erasure of the first component.
The text was updated successfully, but these errors were encountered: