Casting in Qute? #34116
Answered
by
mkouba
GregJohnStewart
asked this question in
Q&A
Casting in Qute?
#34116
-
I have a pojo that can be one of several sub-classes. This pojo is held in another object, which holds the superclass form. Qute seems to preemptively be judging that the object doesn't have the method:
This produces:
( Is there an easy way to deal with polymorphism in Qute? Casting in the typical sense doesn't work here. Also tried |
Beta Was this translation helpful? Give feedback.
Answered by
mkouba
Jun 19, 2023
Replies: 1 comment 2 replies
-
/cc @mkouba (qute) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ok, so this is a build time validation error. We don't know the runtime type of the object returned from the
getCheckedOutFor()
method at this time. You can try to exclude this particular method from validation by means ofquarkus.qute.type-check-excludes=org.acme.CheckoutFor.getEntity
. It should resolve just fine at runtime.