-
Notifications
You must be signed in to change notification settings - Fork 159
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 for StackOverflow on Recursive Class Definitions. #1408
base: trunk
Are you sure you want to change the base?
Conversation
assertEquals( | ||
expected = "SomeType<" + | ||
"app.cash.zipline.internal.bridge.SomeRecursiveType<" + | ||
"app.cash.zipline.internal.bridge.SomeRecursiveType?<app.cash.zipline.internal.bridge.SomeRecursiveType?>" + |
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.
I'm wondering if it's necessary to include the second copy here. If we break before recursing it won't be included, and isn't it entirely redundant?
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.
@JakeWharton you are correct, it does exit, in above:
- 1st serialName of Non-Nullable
SomeRecursiveType
. - 1st serialName of Nullable
SomeRecursiveType
. - 2nd Recurse serialName of Nullable
SomeRecursiveType
, hence exits with plain serialName of descriptor.
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.
Right my question was if the second copy is actually necessary or redundant
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.
AhUnderstood what you mean,
Yes we could just return empty string once we hit recursion instead of repeating serialName, shouldn't matter.
zipline/src/commonMain/kotlin/app/cash/zipline/internal/bridge/ZiplineServiceAdapter.kt
Outdated
Show resolved
Hide resolved
Co-authored-by: Jake Wharton <[email protected]>
Shall Fix #1163.
PS: