You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (JIRA)" <ji...@apache.org> on 2017/11/09 11:54:00 UTC

[jira] [Updated] (GROOVY-7315) CompileStatic/TypeChecked cannot create non-static nested inner class using named-arg short-hand syntax

     [ https://issues.apache.org/jira/browse/GROOVY-7315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul King updated GROOVY-7315:
------------------------------
    Summary: CompileStatic/TypeChecked cannot create non-static nested inner class using named-arg short-hand syntax  (was: CompileStatic/TypeChecked cannot create non-static nested inner class)

> 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)