[
https://issues.apache.org/jira/browse/GROOVY-6209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jochen Theodorou resolved GROOVY-6209.
--------------------------------------
Assignee: Jochen Theodorou
Resolution: Won't Fix
The result of these discussions over the years turned into Groovy not trying to
resolve such cases at all. And since a workaround exists I close the issue
> Weird error message with lower case class names
> -----------------------------------------------
>
> Key: GROOVY-6209
> URL: https://issues.apache.org/jira/browse/GROOVY-6209
> Project: Groovy
> Issue Type: Bug
> Components: Compiler
> Affects Versions: 2.1.5, 2.2.0-beta-1
> Reporter: Dr. Russel Winder
> Assignee: Jochen Theodorou
> Priority: Major
>
> The code:
> {code}
> class test {
> static void main(args) {
> test t = new test()
> }
> }
> {code}
> results in the error message:
> {noformat}
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup
> failed:
> /home/users/russel/tmp/BSkyB_2013-06-18/test.groovy: 3: Apparent variable 't'
> was found in a static scope but doesn't refer to a local variable, static
> field or class. Possible causes:
> You attempted to reference a variable in the binding or an instance variable
> from a static context.
> You misspelled a classname or statically imported field. Please check the
> spelling.
> You attempted to use a method 't' but left out brackets in a place not
> allowed by the grammar.
> @ line 3, column 10.
> test t = new test()
> ^
> 1 error
> {noformat}
> Editing the code g/test/s//Test/g means the code compiles and executes fine.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)