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.
Uh oh!
There was an error while loading. Please reload this page.
-
In Scala 2, it was possible to:
t: Typedoval companionTpe = t.companions: Symboldoval companionTpe = s.companion.typeSignatureAnd then for example to work with the
unapplyresolved through the companion.There is no such equivalent in Scala 3.
A function a
companioncould be implemented as below onTypeReprMethods.Beta Was this translation helpful? Give feedback.
All reactions