[
https://issues.apache.org/jira/browse/GROOVY-11670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17955433#comment-17955433
]
Eric Milles commented on GROOVY-11670:
--------------------------------------
[methodDeclaration|https://github.com/apache/groovy/blob/8b22dd418079bad79c207742046ae35b6f38d17a/src/antlr/GroovyParser.g4#L282]
includes
[returnType|https://github.com/apache/groovy/blob/8b22dd418079bad79c207742046ae35b6f38d17a/src/antlr/GroovyParser.g4#L302],
which uses
[standardType|https://github.com/apache/groovy/blob/8b22dd418079bad79c207742046ae35b6f38d17a/src/antlr/GroovyParser.g4#L352]
which uses
[standardClassOrInterfaceType|https://github.com/apache/groovy/blob/8b22dd418079bad79c207742046ae35b6f38d17a/src/antlr/GroovyParser.g4#L363]
which uses
[className|https://github.com/apache/groovy/blob/8b22dd418079bad79c207742046ae35b6f38d17a/src/antlr/GroovyParser.g4#L1221]
{{className}} is only {{CaptializedIdentifier}} -- does not include
{{Identifier}}
> Class names that start with lower case letters
> ----------------------------------------------
>
> Key: GROOVY-11670
> URL: https://issues.apache.org/jira/browse/GROOVY-11670
> Project: Groovy
> Issue Type: Improvement
> Components: parser-antlr4
> Affects Versions: 5.0.0-alpha-12, 4.0.26
> Reporter: Saravanan
> Priority: Minor
>
> Classes that start with a lower case name cause parsing errors. I am
> compiling this with @CompileStatic enabled in the compilerConfiguration
> {code:java}
> public class recordTesting {
> private recordTesting someFunction() {
> return null;
> }
> }{code}
> Unexpected input: ';\n\npublic class recordTesting {\n\n private static
> recordTesting someFunction(' @ line 5, column 46.
> tic recordTesting someFunction() {
> ^
> If none of the functions returned a type with a lower case first letter,
> things are fine. It looks like there is no issue with the lower class class
> definition, just the use of that type in a return value. Not sure if the
> CapitalizedIdentifier is an enforced groovy construct. Java allows this and
> groovy causes this to fail as well, preventing use of types defined in java
> {code:java}
> public class SomeOtherClass {
> private someClassDefinedInJava someFunction() {
> }
> }{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)