freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Diogo Kollross (JIRA)" <j...@apache.org>
Subject [jira] [Created] (FREEMARKER-12) #return value bubbles through functions
Date Wed, 18 Nov 2015 16:58:10 GMT
Diogo Kollross created FREEMARKER-12:
----------------------------------------

             Summary: #return value bubbles through functions
                 Key: FREEMARKER-12
                 URL: https://issues.apache.org/jira/browse/FREEMARKER-12
             Project: Apache Freemarker
          Issue Type: Bug
    Affects Versions: 2.3.23
            Reporter: Diogo Kollross


The documentation says that "if ... there was no 'return returnValue', then the return value
of the method is an undefined variable", but the behaviour I'm seeing is that any #return
in inner method calls gets returned as if it was the caller's return value.

In the following example the expected result is an undefined value, but it shows "inner value".

{noformat}
<#function inner>
  <#return "inner value">
</#function>

<#function example>
  <#local temp = inner()>
</#function>

${example()}
{noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message