From users-return-3669-archive-asf-public=cust-asf.ponee.io@groovy.apache.org Wed Jul 4 04:43:48 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 904A4180632 for ; Wed, 4 Jul 2018 04:43:47 +0200 (CEST) Received: (qmail 48735 invoked by uid 500); 4 Jul 2018 02:43:46 -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 48723 invoked by uid 99); 4 Jul 2018 02:43:46 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Jul 2018 02:43:46 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 2BE73C006A for ; Wed, 4 Jul 2018 02:43:46 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.034 X-Spam-Level: *** X-Spam-Status: No, score=3.034 tagged_above=-999 required=6.31 tests=[KAM_INFOUSMEBIZ=0.75, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_SOFTFAIL=0.972, URI_HEX=1.313] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id CGGrVXhznwn0 for ; Wed, 4 Jul 2018 02:43:45 +0000 (UTC) Received: from n5.nabble.com (n5.nabble.com [162.253.133.81]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 0E0455F19A for ; Wed, 4 Jul 2018 02:43:45 +0000 (UTC) Received: from n5.nabble.com (localhost [127.0.0.1]) by n5.nabble.com (Postfix) with ESMTP id B7C8A73A3DF5 for ; Tue, 3 Jul 2018 19:43:44 -0700 (MST) Date: Tue, 3 Jul 2018 19:43:44 -0700 (MST) From: "Daniel.Sun" To: users@groovy.incubator.apache.org Message-ID: <1530672224749-0.post@n5.nabble.com> In-Reply-To: References: <1530585881706-0.post@n5.nabble.com> Subject: Re: About the groovy code style MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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