Open polymorphism json dependencies question, deta...
# serialization
g
Open polymorphism json dependencies question, details in thread.
Every source tells me to use something like this. (Block's an interface, Comment and Body are its subs.)
But I am not seeing a form of subclass that takes a class and a lambda at all. All I see is two overloads with 3 arguments each, none of which are lambdas.
(Sorry, I mean, of
polymorpic(...)
And this is the relevant part of the sub-project's gradle.
e
you should see both the polymorphic member function and the polymorphic extension function
g
Right, and I think I'm missing the extension. I faintly remembered having this problem before, and suspected a dependency disconnect.
e
it's not a dependency issue, they're in the same artifact
you need to import the extension, which should also happen if you choose the right overload in the IDE
g
Yes, there are two variants showing in intellisense, both take 3 arguments, neither takes a lambda.
e
intellisense?
g
The auto-complete suggestion list.
e
intellisense is the name used by Microsoft for their IDEs
it should just work in a JetBrains IDE such as IntelliJ (or something based on it such as Android Studio) or Fleet… if not, try importing it manually
g
I am in intellij.
e
and what are the two that it auto-completes to anyway?
g
Aiiiiiiieeeeeee! Cache problem. Invalidated the cache, intellij now finds it. <grumble grumble grumble>. Thanks for your efforts!
Two versions of the invocation. The first one works, the second one does not compile.
e
why
.java
?
g
Typo -- I've tried a lot of things in the last two hours. 🙂
Seems like intellij does not offer and cannot find the correct imports. Instead, it only sees the one in
SerializerModulesBuilder
.
With those two imports, both versions above compile.
Thanks, again, for the responses, @ephemient, just your patient poking at it was a great help!