-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
minimized example
opaque type PhoneNumber = String
case class Person( phone: PhoneNumber )
For a serialization library I'm working on, I can reflect on Person and get information on its fields, i.e. phone. I can know that its type is PhoneNumber. I can't (today) learn that PhoneNumber's "real" type is String.
The serializer would need this to handle field phone as a String for serialization purposes.
Compilation output
Today the reflected TypeRef for field phone's type is something like this:
TypeRef(TermRef(TermRef(ThisType(TypeRef(NoPrefix,module class com)),module mypkg),Dog$package),PhoneNumber)
expectation
Somewhere in the TypeRef, add information about PhoneNumber's base type. Please (please) not just a label "String" or something flat like that. I need to be able to continue reflecting on the base type, especially if it isn't a primitive type! (A wrapped TypeRef?)
hrhino and odd
Metadata
Metadata
Assignees
Labels
No labels