groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GROOVY-7315) CompileStatic/TypeChecked cannot create non-static nested inner class using named-arg short-hand syntax
Date Sun, 12 Nov 2017 22:26:00 GMT

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

ASF GitHub Bot commented on GROOVY-7315:
----------------------------------------

Github user asfgit closed the pull request at:

    https://github.com/apache/groovy/pull/634


> CompileStatic/TypeChecked cannot create non-static nested inner class using named-arg
short-hand syntax
> -------------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-7315
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7315
>             Project: Groovy
>          Issue Type: Bug
>          Components: Static Type Checker
>    Affects Versions: 2.3.9, 2.4.1
>            Reporter: Jason Winnebeck
>
> {code}
> @groovy.transform.CompileStatic
> class X {
>   Y makeY() {
>     new Y(a:1)
>   }
>   
>   private class Y {
>     int a
>   }
> }
> println new X().makeY()
> {code}
> Error:
> {noformat}
> [Static type checking] - Cannot find matching method X$Y#<init>(X, java.util.LinkedHashMap
<java.lang.String, java.lang.Integer>). Please check if the declared type is right and
if the method exists.
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message