[prev in list] [next in list] [prev in thread] [next in thread] 

List:       groovy-scm
Subject:    [groovy-scm] [jira] Resolved: (GROOVY-3864) When writing a script (no class),
From:       "Roberto (JIRA)" <jira () codehaus ! org>
Date:       2009-10-31 22:17:55
Message-ID: 15608549.290.1257027475292.JavaMail.haus-jira () codehaus01 ! managed ! contegix ! com
[Download RAW message or body]


     [ http://jira.codehaus.org/browse/GROOVY-3864?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel \
]

Roberto resolved GROOVY-3864.
-----------------------------

    Resolution: Not A Bug

> When writing a script (no class), funtions can't see declared properties
> ------------------------------------------------------------------------
> 
> Key: GROOVY-3864
> URL: http://jira.codehaus.org/browse/GROOVY-3864
> Project: groovy
> Issue Type: Bug
> Affects Versions: 1.7-beta-1, 1.6.5
> Environment: Java 1.6.0_16
> Eclipse 3.5
> Windows XP 32 bit
> Reporter: Roberto
> 
> I wrote the following test script. No class. I run the script from eclipse
> {code}
> def myString="Hello"
> void printMyString() {
> print myString
> }
> printMyString()
> {code}
> And I get the following exception: 
> groovy.lang.MissingPropertyException: No such property: myString for class: \
> TestFunc I tried both with and without package.
> It works fine if I use a Closure or define the whole thing inside a class

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: \
                http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

<hr/>
<p>
To unsubscribe from this list please visit:
</p>
<p>
    <a href="http://xircles.codehaus.org/manage_email">http://xircles.codehaus.org/manage_email</a>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic