Bug? #if JavaWhatever throws compiler error 'unclosed character literal'

walt61

Active Member
Licensed User
Hi Erel,

You already know you've got brilliant products, but still: brilliant products ! :) I came across this issue - it took me a while to figure out what was going on and I reckon it's a bug. I use B4A 4.30 with Build Configurations. In a shared code module I had

B4X:
#If JavaObject
...
#End If
As of B4A 4.30 with the inline Java, the '#If Java' (regardless of any other characters following in that string) seems to be interpreted by the compiler as the start of inline Java and the error 'unclosed character literal' comes up. Changing 'Java' to 'Ja_va' obviously solved it, so no big deal, but it was confusing and I presume this behaviour wasn't intentional.

Cheers,

walt61
 
Top