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 test

define 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 call max(1, 2) results in bad translation of the function call. It should point to webdsl.generated.functions.max_.max0_(1, 2) instead of

webdsl.generated.functions.max0_.max0_(1, 2).

Submitted by Elmer van Chastelet on 6 February 2012 at 19:01

On 9 February 2012 at 16:47 Christoffer Gersen commented:

Fixed in revision 4916. The call is now renamed to webdsl.generated.functions.max_.max_(1, 2).


On 9 February 2012 at 16:47 Christoffer Gersen closed this issue.

Log in to post comments