[jira] [Commented] (GROOVY-11208) No parse error for interface method with default value

2023-10-28 Thread Paul King (Jira)


[ 
https://issues.apache.org/jira/browse/GROOVY-11208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17780615#comment-17780615
 ] 

Paul King commented on GROOVY-11208:


I think that is outdated. We should probably remove support. There is a 
microscopic but non-zero chance that someone defines a DSL/AST transform that 
accepts such syntax and converts it into something useful. I suggest therefore 
we do this just for Groovy 5.

> No parse error for interface method with default value
> --
>
> Key: GROOVY-11208
> URL: https://issues.apache.org/jira/browse/GROOVY-11208
> Project: Groovy
>  Issue Type: Bug
>  Components: parser-antlr4
>Reporter: Eric Milles
>Priority: Major
>
> I noticed this syntax mentioned here: 
> https://groovy.apache.org/wiki/GEP-12.html
> Is this supposed to be valid for some case or is it defunct?
> {code:groovy}
> interface I {
>   def m() default { 1 }
> }
> {code}
> It does not produce any parser or compiler errors.  But I don't think the 
> default value saved in {{MethodNode}} is used for anything.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (GROOVY-11208) No parse error for interface method with default value

2023-10-28 Thread Jochen Theodorou (Jira)


[ 
https://issues.apache.org/jira/browse/GROOVY-11208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17780603#comment-17780603
 ] 

Jochen Theodorou commented on GROOVY-11208:
---

That syntax looks wrong. What bytecode is produced from that?

> No parse error for interface method with default value
> --
>
> Key: GROOVY-11208
> URL: https://issues.apache.org/jira/browse/GROOVY-11208
> Project: Groovy
>  Issue Type: Bug
>  Components: parser-antlr4
>Reporter: Eric Milles
>Priority: Major
>
> I noticed this syntax mentioned here: 
> https://groovy.apache.org/wiki/GEP-12.html
> Is this supposed to be valid for some case or is it defunct?
> {code:groovy}
> interface I {
>   def m() default { 1 }
> }
> {code}
> It does not produce any parser or compiler errors.  But I don't think the 
> default value saved in {{MethodNode}} is used for anything.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)