For example, one need to check whether an expression is of whole number type: Byte, Short, Int, Long but not Double or Float. The following code doesn't always work:
case Apply(Select(q, n), List(rhs)) =>
if (q.tpe.weak_<:<(typeOf[Long])) true else false
For some q their tpe won't be weak conformed even though it has Int type:
a.type weak_<:< Long == false
q.symbol.typeSignature
instead of q.tpe
works correctly, but not all q
have symbol != NoSymbol