Closed ghost closed 5 years ago
Oh that's a drag. Not sure I should change this so it works with Kotlin. won't that break the Java connection?
You can add extra if statement which checks whether methodSuffix starts with "is" if so then try to look it up. I can create PR with tests covered. This should not break compatibility with Java.
Not sure I should change this so it works with
Not a big problem, just FYI. You may close the issue
Thanks
ok, thanks.
Affected ST4 version: 4.0.2
Lets create simple
object with isTrue set to "true"
If i want to render following template:
then "property is false" is rendered.
This happens because ObjectModelAdaptor unable to find isTrue property when kotlinc compiler is used to fullfill reflection data. If property starts with "is" then "isTrue()" getter is generated but ST4 expects either "getIsTrue" or "isIsTrue". If you remove "is" prefix or use Java class then ST4 handles it perfectly.
Please check my debug screenshot: