Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

include() 函数和 #tag layout() 传的 Map 参数出现编译错误 #42

Closed
subchen opened this issue Dec 7, 2013 · 0 comments
Closed
Assignees
Labels
Milestone

Comments

@subchen
Copy link
Owner

subchen commented Dec 7, 2013

模板-1

${include("header.jetx", {"name": "jetbrick"})}

模板-2

#tag layout("layout.jetx", {"name": "jetbrick"})
    hello from main
#end

出现的错误

Exception in thread "main" jetbrick.template.compiler.CompileErrorException: Compilation failed.
C:\Users\Sub\AppData\Local\Temp\jetx_1_0_0\template\ext_002dfunctions_002dinclude_jetx.java:18: cannot find symbol
symbol  : method include(jetbrick.template.runtime.JetPageContext,java.lang.String,java.util.Map<capture#208 of ?,capture#811 of ?>)
location: class jetbrick.template.runtime.JetFunctions
  17:     $out.print($txt_1, $txt_1_bytes);
  18:     $out.print(JetFunctions.include($ctx,"header.jetx",JetUtils.asMap("name","jetbrick"))); // line: 3
                                 ^
1 error(s)

    at jetbrick.template.compiler.jdk.JdkCompiler.generateJavaClass(JdkCompiler.java:131)
    at jetbrick.template.compiler.jdk.JdkCompiler.compile(JdkCompiler.java:102)
    at jetbrick.template.JetTemplate.compileAndLoadClass(JetTemplate.java:114)
    at jetbrick.template.JetTemplate.<init>(JetTemplate.java:68)
    at jetbrick.template.JetEngine$ConcurrentTemplateCache.doGetValue(JetEngine.java:179)
    at jetbrick.template.JetEngine$ConcurrentTemplateCache.doGetValue(JetEngine.java:1)
    at jetbrick.template.utils.ConcurrentCache.get(ConcurrentCache.java:44)
    at jetbrick.template.JetEngine.getTemplate(JetEngine.java:92)
@ghost ghost assigned subchen Dec 7, 2013
@subchen subchen closed this as completed in caa2931 Dec 7, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant