-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#patch Fix restriction on maps/collections nesting #309
#patch Fix restriction on maps/collections nesting #309
Conversation
9ceac11
to
3c6a085
Compare
@@ -72,87 +73,17 @@ object SdkLiteralTypes { | |||
blobs(BlobType.DEFAULT).asInstanceOf[SdkLiteralType[T]] | |||
case t if t =:= typeOf[Binary] => | |||
binary().asInstanceOf[SdkLiteralType[T]] | |||
|
|||
case t if t <:< typeOf[List[Any]] => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
technically, List[T]
is also a Product
, so I'm not sure how this match worked before
@@ -369,28 +301,6 @@ object SdkLiteralTypes { | |||
} | |||
} | |||
|
|||
def createTypeTag[U <: Product](tpe: Type): TypeTag[U] = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pulled out to further down, so it is accessible in .of()
val typeRef = | ||
universe.internal.typeRef(NoPrefix, typSym, tpe.typeArgs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to add the tpe.typeArgs
as the last argument instead of List.empty
as it would otherwise create a type tag e.g. for List
instead of List[String]
, which messes up the recursion
433e1cd
to
e647d77
Compare
TL;DR
Removing the restriction on nesting depth for collections and maps
Type
Are all requirements met?
Complete description
Removing the restriction on nesting depth for collections and maps. This simplifies the matching expression for SdkLiteralTypes.
This reuses the logic for creating TypeTags for a given type (-name) on the fly to make
SdkLiteralTypes.of(...)
recursive.Tracking Issue
NA
Follow-up issue
NA