groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel.Sun" <sun...@apache.org>
Subject Re: About the groovy code style
Date Wed, 04 Jul 2018 02:43:44 GMT
Hi Paul,

> def foobar2 = 'foo'
>     + 'bar2'
> 
> which compiles but gives a runtime error:
> MissingMethodException: No signature of method:
> java.lang.String.positive()
> 
> 
> Since + here is the unary plus operator which while seldom used in that
> fashion is a valid operator.
> 
> Strangely, the foobar2 example parses and runs successfully on Groovy 3
> setting
> foobar2 to 'foo'. I'll have to check if that is a bug or "feature".

It is a bug of Parrot and is fixed in 3.0.0-alpha-4. See
https://github.com/apache/groovy/commit/2c1f7e3c47b3c1d12c05a1540307c43f1267b10f

Cheers,
Daniel.Sun




-----
Daniel Sun 
Apache Groovy committer 
Blog: http://blog.sunlan.me 
Twitter: @daniel_sun 

--
Sent from: http://groovy.329449.n5.nabble.com/Groovy-Users-f329450.html

Mime
View raw message