def apply(quotes: Quotes)(aType: quotes.reflect.TypeRepr, typedName: TypedName, resolveTypeSyms: Boolean): RType[_] =
import quotes.reflect.*
val typeRef = aType.asInstanceOf[TypeRef]
typeRef.classSymbol match {
case None =>
typeRef match {
case AndType(left,right) => ...
}
case Some(classSymbol) =>
typeRef match {
case OrType(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.
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.