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 13:10:00 GMT

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

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

GitHub user paulk-asert opened a pull request:

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

    GROOVY-7315: CompileStatic/TypeChecked cannot create non-static neste…

    …d inner class using named-arg short-hand syntax

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/paulk-asert/groovy groovy7315

Alternatively you can review and apply these changes as the patch at:

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

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #634
    
----
commit bbe86ea52512803d155ed0c085f8b0cce0299b13
Author: paulk <paulk@asert.com.au>
Date:   2017-11-12T13:07:27Z

    GROOVY-7315: CompileStatic/TypeChecked cannot create non-static nested inner class using
named-arg short-hand syntax

----


> 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