Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id BDC50200D3E for ; Thu, 16 Nov 2017 12:05:32 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id BC6B8160BE6; Thu, 16 Nov 2017 11:05:32 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B45BB160BE5 for ; Thu, 16 Nov 2017 12:05:31 +0100 (CET) Received: (qmail 70624 invoked by uid 500); 16 Nov 2017 11:05:30 -0000 Mailing-List: contact users-help@groovy.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@groovy.apache.org Delivered-To: mailing list users@groovy.apache.org Received: (qmail 70614 invoked by uid 99); 16 Nov 2017 11:05:30 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Nov 2017 11:05:30 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id EC99BC968A for ; Thu, 16 Nov 2017 11:05:29 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.481 X-Spam-Level: ** X-Spam-Status: No, score=2.481 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, HTML_OBFUSCATE_05_10=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=asert-com-au.20150623.gappssmtp.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id Up80mWP3aCwt for ; Thu, 16 Nov 2017 11:05:29 +0000 (UTC) Received: from mail-ot0-f196.google.com (mail-ot0-f196.google.com [74.125.82.196]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id ADA045FD01 for ; Thu, 16 Nov 2017 11:05:28 +0000 (UTC) Received: by mail-ot0-f196.google.com with SMTP id g104so10104994otg.7 for ; Thu, 16 Nov 2017 03:05:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=asert-com-au.20150623.gappssmtp.com; s=20150623; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to; bh=Gy1WJJiSzBhq76RZVaRbB30dG/wS58nEXHpu8bOqkKM=; b=ZxRlal8mWeAjsTQ/UiKYPDbphSpNI3jhKOYEs9N7K3hH1IyocBVwZc2kW2cH6x6q8Z Au1c9FHukzGSvYnxcpeB8DzyXhUl9flo43PEpTOPdpjImyiQd9rRaEcXbtBdYUhNn+bB BGXCewQI0GTPk/Zay9mdhisJyTEWzQWjXNAgyy7Y1f0+9qevQwEJubmvtrvz4PHZF9Eu 7njzbAjSFnQPQv6xea9vHPZeQ3uOJG2+WVWDzZeiyrBKYpdffPxxM8jN/K4dqReqG6XW XROVYeWYvEY67NXlEkB6bHwBo12y8NW8Dl95229/QDjb/6uDNQXnKZYIqCUNdoIVxb78 2Fvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to; bh=Gy1WJJiSzBhq76RZVaRbB30dG/wS58nEXHpu8bOqkKM=; b=Mu3RuIskkWBM68vgzGCDA7irGBaxr8R5u2YwsU6ZvBy5MuUZ3vPV0Yn3R0E21H5lEl KQZXRayIMpbpim/Ycphrs4zwiWH2P80DHk9v/fq4MAdImks6eq4yeCl0yiPJ2fMCxDUD BlvGTn5ezlOSGkpNaUC5aoH4QId2RuZyEjPo+yKWBlz7XRuq+I3M6liX9Eh8zfEYiIRZ 2wSTLsoVGBqi84JlcfayTG6mnToKItwlcQCgX4U+S7R4oL9ke+Ja9qdWT5e6XRCBqhcY 3Vb/++aLmKpoipuBsOvAIxopWK4soSloNd6ZwNb9C2lxbofs3tGzuV0WasA/W/dNdbel QCEA== X-Gm-Message-State: AJaThX7tJ4Yd1BkItknbZJSsIWIFk4xeoccI1Im0E++sBgRA+EBljXEL 64O4cLZ33cALzDr1+5GpMhAGqG028YuXaWW23nTwjh3z X-Google-Smtp-Source: AGs4zMZxRBOlMQWdU031QfxR9V5zXeBE4U4m+eg1sJ9u2RwH0Bb566hwyolgDxC6J23cMTjtk51838bqKR4SZMGYoTk= X-Received: by 10.157.74.4 with SMTP id h4mr815321otf.308.1510830327655; Thu, 16 Nov 2017 03:05:27 -0800 (PST) MIME-Version: 1.0 Received: by 10.74.14.68 with HTTP; Thu, 16 Nov 2017 03:05:27 -0800 (PST) Reply-To: paulk@asert.com.au In-Reply-To: References: From: Paul King Date: Thu, 16 Nov 2017 21:05:27 +1000 Message-ID: Subject: Re: NF build error To: users@groovy.apache.org Content-Type: multipart/alternative; boundary="94eb2c0ddb6afefe28055e1798a3" archived-at: Thu, 16 Nov 2017 11:05:32 -0000 --94eb2c0ddb6afefe28055e1798a3 Content-Type: text/plain; charset="UTF-8" Incidentally, here is the reproducer I have been using: @groovy.transform.CompileStatic class Foo { List baz = ['foo'] ?: [] // 1 def bar() { List items = ['foo'] ?: [] // 2 } static bar2() { new Foo().baz = ['foo'] ?: [] // 3 } } new Foo().bar() The applied fix targets 2, doesn't cover 1 and gives the ClassCastException for 3. Our test coverage obviously still needs further attention. :-( Cheers, Paul. On Thu, Nov 16, 2017 at 8:59 PM, Paul King wrote: > Feel free to create one. We can always close it if we end up fixing under > another issue number. > > On Thu, Nov 16, 2017 at 6:51 PM, Paolo Di Tommaso < > paolo.ditommaso@gmail.com> wrote: > >> Let me know if you want I open an issue for this problem. >> >> >> Cheers, >> Paolo >> >> >> On Wed, Nov 15, 2017 at 10:19 PM, Paolo Di Tommaso < >> paolo.ditommaso@gmail.com> wrote: >> >>> Apparently the latest 2.4.13 SNAPSHOT introduced a compilation error in >>> the Nextflow joint build: >>> >>> >>> startup failed: >>> General error during instruction selection: >>> org.codehaus.groovy.ast.expr.PropertyExpression cannot be cast to >>> org.codehaus.groovy.ast.expr.VariableExpression >>> >>> java.lang.ClassCastException: org.codehaus.groovy.ast.expr.PropertyExpression >>> cannot be cast to org.codehaus.groovy.ast.expr.VariableExpression >>> at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor. >>> checkForTargetType(StaticTypeCheckingVisitor.java:3455) >>> at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor. >>> visitTernaryExpression(StaticTypeCheckingVisitor.java:3428) >>> at org.codehaus.groovy.ast.expr.TernaryExpression.visit(Ternary >>> Expression.java:45) >>> at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor. >>> visitBinaryExpression(StaticTypeCheckingVisitor.java:585) >>> at org.codehaus.groovy.ast.expr.BinaryExpression.visit(BinaryEx >>> pression.java:51) >>> at org.codehaus.groovy.ast.CodeVisitorSupport.visitExpressionSt >>> atement(CodeVisitorSupport.java:71) >>> at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitExpress >>> ionStatement(ClassCodeVisitorSupport.java:196) >>> >>> >>> More details here >>> >>> . >>> >>> >>> >>> p >>> >>> >>> >> > --94eb2c0ddb6afefe28055e1798a3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Incidentally, here is the reproducer I have been using:
@groovy.transform.CompileStatic
class Foo {
= =C2=A0 List<String> baz =3D ['foo'] ?: [] // 1
=C2= =A0 def bar() {
=C2=A0 =C2=A0 List<String> items =3D ['= foo'] ?: [] // 2
=C2=A0 }
=C2=A0 static bar2() {
=C2=A0 =C2=A0 new Foo().baz =3D ['foo'] ?: [] // 3
=C2=A0 }
}

new Foo().bar()
<= br>The applied fix targets 2, doesn't cover 1 and gives the ClassCastEx= ception for 3. Our test coverage obviously still needs further attention. := -(

Cheers, Paul.


On Thu, Nov 16, 2017 at = 8:59 PM, Paul King <paulk@asert.com.au> wrote:
Feel free to create one. We can alwa= ys close it if we end up fixing under another issue number.

On Thu, Nov 16, 2017 at 6:51 PM, Paolo Di Tommaso <pa= olo.ditommaso@gmail.com> wrote:
Let me know if you want I open an issue for this prob= lem.=C2=A0


Cheers,
Paolo

On Wed, Nov 15, 2017 at 10:19 PM, Paolo Di Tommaso &= lt;paolo.dit= ommaso@gmail.com> wrote:
Apparently the latest 2.4.13 SNAPSHOT introduced a compilati= on error in the Nextflow joint build:=C2=A0


=C2=A0startup failed:
=C2=A0General error during inst= ruction selection: org.codehaus.groovy.ast.expr.PropertyExpression can= not be cast to org.codehaus.groovy.ast.expr.VariableExpression<= /div>
=C2=A0
=C2=A0java.lang.ClassCastException: org.code= haus.groovy.ast.expr.PropertyExpression cannot be cast to org.codehaus= .groovy.ast.expr.VariableExpression
=C2=A0 at or= g.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.checkFo= rTargetType(StaticTypeCheckingVisitor.java:3455)
=C2=A0= at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor= .visitTernaryExpression(StaticTypeCheckingVisitor.java:3428)
=C2=A0 at org.codehaus.groovy.ast.expr.TernaryExpres= sion.visit(TernaryExpression.java:45)
=C2=A0 at = org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visit= BinaryExpression(StaticTypeCheckingVisitor.java:585)
= =C2=A0 at org.codehaus.groovy.ast.expr.BinaryExpression.visit(Bin= aryExpression.java:51)
=C2=A0 at org.codehaus.gr= oovy.ast.CodeVisitorSupport.visitExpressionStatement(CodeVisitorS= upport.java:71)
= =C2=A0 at org.codehaus.groovy.a= st.ClassCodeVisitorSupport.visitExpressionStatement(ClassCodeVisi= torSupport.java:196)


<= div>More details here.
=



p





--94eb2c0ddb6afefe28055e1798a3--