You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As shown in the question, when extending FungibleToken, it will get the error of incompatible return type. This only happens when writing in Java. Kotlin works just fine.
This could be because the supportedSchemas() in the FungibleToken does not specify its return type.
That's to say, if we change the supportedSchemas() method in the FungibleToken from override fun supportedSchemas() = listOf(FungibleTokenSchemaV1)
to override fun supportedSchemas() : Iterable<MappedSchema> = listOf(FungibleTokenSchemaV1)
Then the error will disappear.
The text was updated successfully, but these errors were encountered:
There is a question asked long time ago:
https://stackoverflow.com/questions/57650475/error-when-extending-fungibletoken-supportedschemas-in-queryablestate-clashes
As shown in the question, when extending FungibleToken, it will get the error of incompatible return type. This only happens when writing in Java. Kotlin works just fine.
This could be because the
supportedSchemas()
in the FungibleToken does not specify its return type.That's to say, if we change the
supportedSchemas()
method in the FungibleToken fromoverride fun supportedSchemas() = listOf(FungibleTokenSchemaV1)
to
override fun supportedSchemas() : Iterable<MappedSchema> = listOf(FungibleTokenSchemaV1)
Then the error will disappear.
The text was updated successfully, but these errors were encountered: