Cannot use methods that take int
{{ arraylist.get(0) }} does not work because numbers seem to be long by default in pebble and that method takes int.
This is a very serious issue as there is no possibility to cast or define variable type in pebble
Why are numbers long by default though, there would be next to no problem if default was int and 123L was long like in Java
In PebbleEngine Builder, you can set literalDecimalTreatedAsInteger to true if you want that behavior
@ebussieres Thanks, but how do I use longs if I do that? I need to kill support for one to use the other, does not seem very clean to me but I have no methods that take long so it's no problem. (On that note, using other data types smaller than int probably doesn't work either as the concept of casts does not exist.)
Shouldn't the default (unconfigured) be int? What's the reason for having long by default?
If the reason for using long by default is to support larger numbers then that does not make sense because the Java default is not so and to support larger numbers one would use BigInteger/BigDecimal.