We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
A data class which contains a member which is a typealias causes the generated code to be invalid.
typealias
This code:
typealias Foo = Either<String, Int> @json data class DataClass1( val foo: Foo ) { companion object }
Generates this:
fun DataClass1.toJson(): Json = JsObject(mapOf( "foo" to com.octogonapus.heliosdemo.Foo.encoder().run { foo.encode() } ))
foo.encode() is an unresolved reference.
foo.encode()
Changing the data class to:
@json data class DataClass1( val foo: Either<String, Int> ) { companion object }
Generates this, which compiles fine:
fun DataClass1.toJson(): Json = JsObject(mapOf( "foo" to arrow.core.Either.Companion.encoder(kotlin.String.encoder(), kotlin.Int.encoder()).run { foo.encode() } ))
There is a sample project containing this code here https://github.com/Octogonapus/helios-demo/tree/typealias_issue (specifically on branch typealias_issue).
typealias_issue
The text was updated successfully, but these errors were encountered:
No branches or pull requests
A data class which contains a member which is a
typealias
causes the generated code to be invalid.This code:
Generates this:
foo.encode()
is an unresolved reference.Changing the data class to:
Generates this, which compiles fine:
There is a sample project containing this code here https://github.com/Octogonapus/helios-demo/tree/typealias_issue (specifically on branch
typealias_issue
).The text was updated successfully, but these errors were encountered: