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
defapply(quotes: Quotes)(aType: quotes.reflect.TypeRepr, typedName: TypedName, resolveTypeSyms: Boolean):RType[_] =importquotes.reflect.*valtypeRef= aType.asInstanceOf[TypeRef]
typeRef.classSymbol match {
caseNone=>
typeRef match {
caseAndType(left,right) => ...
}
caseSome(classSymbol) =>
typeRef match {
caseOrType(left,right) => ...
}
Expectation
Union types (OR) are marked with scala.Matchable trait, so they have a classSymbol. Not a very interesting one, but Intersection (AND) types do not have this. So its strange they are handled differently. Previously, both had no classSymbol, and now only one does. Not the end of all things, but this seems like an oversight when Matchable was added to OR. If you add Matchable to AND then it would be consistent again, and you'd be set up for success if ever you want to add behavior to Matchable.
The text was updated successfully, but these errors were encountered:
Compiler version
3.3.0
Minimized code
Expectation
Union types (OR) are marked with scala.Matchable trait, so they have a classSymbol. Not a very interesting one, but Intersection (AND) types do not have this. So its strange they are handled differently. Previously, both had no classSymbol, and now only one does. Not the end of all things, but this seems like an oversight when Matchable was added to OR. If you add Matchable to AND then it would be consistent again, and you'd be set up for success if ever you want to add behavior to Matchable.
The text was updated successfully, but these errors were encountered: