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
For example, the custom target exposes a boolean property CElement.isVariadic. But the name appears to only be accessible as variadic instead. I.e. ${element.isVariadic} does not work as expected, but ${element.variadic} does.
There's things at play which make accessing boolean properties prefixed with "is" very confusing.
Firstly, there is partly due to an idiom of Apache Freemarker. This behavior is not well described in their manual. The best part of their manual that I can find about it is here.
Basically, element.variadic calls element.isVariadic(). or element.getVariadic(), or element.variadic() depending on which is available.
Addtionally, some inconsistencies in the Java API exposed by Kotlin makes this even worse. Basically, the following Kotlin class:
classX(valfoo:Int, valisBar:Boolean)
Kotlin generates a .class file with the following Java API:
public final class X {
private final int foo;
private final boolean isBar;
public final int getFoo() {
return this.foo;
}
public final boolean isBar() {
return this.isBar;
}
public X(int foo, boolean isBar) {
this.foo = foo;
this.isBar = isBar;
}
}
Note that, for foo, a getFoo() method is generated, but, for isBar, only an isBar method is generated.
The text was updated successfully, but these errors were encountered:
For example, the custom target exposes a boolean property
CElement.isVariadic
. But the name appears to only be accessible asvariadic
instead. I.e.${element.isVariadic}
does not work as expected, but${element.variadic}
does.There's things at play which make accessing boolean properties prefixed with "is" very confusing.
Firstly, there is partly due to an idiom of Apache Freemarker. This behavior is not well described in their manual. The best part of their manual that I can find about it is here.
Basically,
element.variadic
callselement.isVariadic()
. orelement.getVariadic()
, orelement.variadic()
depending on which is available.Addtionally, some inconsistencies in the Java API exposed by Kotlin makes this even worse. Basically, the following Kotlin class:
Kotlin generates a
.class
file with the following Java API:Note that, for
foo
, agetFoo()
method is generated, but, forisBar
, only anisBar
method is generated.The text was updated successfully, but these errors were encountered: