OK. Thanks! p
On Thu, Nov 16, 2017 at 2:16 PM, Paul King <pa...@asert.com.au> wrote: > Actually, I created GROOVY-8382 to cover some new cases and fix the bug > you observed. > > On Thu, Nov 16, 2017 at 9:05 PM, Paul King <pa...@asert.com.au> wrote: > >> Incidentally, here is the reproducer I have been using: >> >> @groovy.transform.CompileStatic >> class Foo { >> List<String> baz = ['foo'] ?: [] // 1 >> def bar() { >> List<String> 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 <pa...@asert.com.au> 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.ditomm...@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.ditomm...@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 >>>>> <http://ci.groovy-lang.org/viewLog.html?buildId=44081&buildTypeId=JointBuilds_Nextflow_Groovy24xJointBuild&tab=buildLog#_focus=141&state=141> >>>>> . >>>>> >>>>> >>>>> >>>>> p >>>>> >>>>> >>>>> >>>> >>> >> >