Freemarker template "Cannot resolve parameter"
Hi,
here's a freemarker template:
<#-- @ftlvariable name="" type="java.lang.String" -->
<#macro sayHello >
<h1>Hello, ${class}</h1>
</#macro>
<@sayHello />
Both occurences of the word "class" generate warnings in Idea 9.0.4. It seems that this is because the syntax checker can't work out whether "class" is a reference to the macro parameter name or to the "getClass()" method on java.lang.String (change the parameter name to something that's not a method on the class and the problem goes away).
Particularly in the code that calls the macro, it's clearly not a reference to getClass(), and so the warning should be avoidable.
Is there a way round this? Should I raise a bug report?
Regards,
- Dave
请先登录再写评论。
Yes, please file a bug request