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
After recent fixes, the following code doesn't crash but gives an error message worth improving:
scala>classA1extends _
1|classA1extends _
|^| is not a classtype
That error comes from ctx.error(ex"$tp is not a class type", pos), but $tp is being pretty-printed to the empty string. This happens because $tp is TypeBounds(q"Nothing", q"Any") (where q"Nothing" is just informal quasiquote notation) instead of being WildcardType(TypeBounds(q"Nothing", q"Any")), and such type bounds are correctly pretty-printed to the empty string.
The text was updated successfully, but these errors were encountered:
I actually think the error message is fine. The pointed to _ is indeed not a class type. Since this error is very unlikely to occur in the wild, I would not spend time and code lines to improve it.
After recent fixes, the following code doesn't crash but gives an error message worth improving:
That error comes from
ctx.error(ex"$tp is not a class type", pos)
, but$tp
is being pretty-printed to the empty string. This happens because$tp
isTypeBounds(q"Nothing", q"Any")
(whereq"Nothing"
is just informal quasiquote notation) instead of beingWildcardType(TypeBounds(q"Nothing", q"Any"))
, and such type bounds are correctly pretty-printed to the empty string.The text was updated successfully, but these errors were encountered: