Working with companion type for a resolved TypeRepr or Symbol #17825
Replies: 4 comments 1 reply
-
Seems like a good addition to me. Why don't you make a PR directly on the Dotty repo? (I'm not affiliated with the compiler team.) |
Beta Was this translation helpful? Give feedback.
-
I would be able to do so iff how the tests are executed was clear/documented. |
Beta Was this translation helpful? Give feedback.
-
Running the SBT |
Beta Was this translation helpful? Give feedback.
-
No it's not, and it lacks a proper documentation. |
Beta Was this translation helpful? Give feedback.
-
In Scala 2, it was possible to:
t: Type
doval companionTpe = t.companion
s: Symbol
doval companionTpe = s.companion.typeSignature
And then for example to work with the
unapply
resolved through the companion.There is no such equivalent in Scala 3.
A function a
companion
could be implemented as below onTypeReprMethods
.Beta Was this translation helpful? Give feedback.
All reactions