page/template param cannot have same name as function called within that template
If there is a page/template param with the same name as a function (invoked withing that page/template), the webdsl compiler mistakenly renames the name of the class the function appears in.
…/test/succeed/function-call-and-equally-named-var.app:
application testdefine page root() {
""
}define page home(max : Int) {
var min := min(1, 2);
var r := max(1, 2);
}function max(i : Int, j : Int) : Int {
if(i > j) { return i; } else { return j; }
}function min(i : Int, j : Int) : Int {
if(i > j) { return j; } else { return i; }
}Javac error:
home_Template.java:147: cannot find symbol
symbol : class max0_
location: package webdsl.generated.functions
r0 = webdsl.generated.functions.max0_.max0_(1, 2);The page var
max
and function callmax(1, 2)
results in bad translation of the function call. It should point towebdsl.generated.functions.max_.max0_(1, 2)
instead ofSubmitted by Elmer van Chastelet on 6 February 2012 at 19:01
webdsl.generated.functions.max0_.max0_(1, 2)
.
Issue Log
Fixed in revision 4916. The call is now renamed to webdsl.generated.functions.max_.max_(1, 2).
Log in to post comments