This is an automated email from the ASF dual-hosted git repository.

git-site-role pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/groovy-dev-site.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new 1603138  2026/04/12 09:09:08: Generated dev website from 
groovy-website@6c80ad6
1603138 is described below

commit 1603138e867b1ec64bf9c59db93b739ff93ec331
Author: jenkins <[email protected]>
AuthorDate: Sun Apr 12 09:09:08 2026 +0000

    2026/04/12 09:09:08: Generated dev website from groovy-website@6c80ad6
---
 search/search-index.json |  2 +-
 wiki/GEP-15.html         | 16 ++++++++++------
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/search/search-index.json b/search/search-index.json
index 855f0e5..2c9b7af 100644
--- a/search/search-index.json
+++ b/search/search-index.json
@@ -800,7 +800,7 @@
     {
         "id": "wiki/GEP-15.html",
         "title": "The Apache Groovy programming language - Developer docs - 
GEP-15",
-        "content": "The Apache Groovy programming language - Developer docs - 
GEP-15 Socialize Discuss on the mailing list Groovy on X Groovy on Bluesky 
Groovy on Mastodon Groovy on LinkedIn Events and conferences Source code on 
GitHub Report issues in Jira Stack Overflow questions Slack Community You are 
using an outdated browser. Please upgrade your browser to improve your 
experience. Apache Groovy&trade; Learn Documentation Download Support 
Contribute Ecosystem Blog posts Socialize GE [...]
+        "content": "The Apache Groovy programming language - Developer docs - 
GEP-15 Socialize Discuss on the mailing list Groovy on X Groovy on Bluesky 
Groovy on Mastodon Groovy on LinkedIn Events and conferences Source code on 
GitHub Report issues in Jira Stack Overflow questions Slack Community You are 
using an outdated browser. Please upgrade your browser to improve your 
experience. Apache Groovy&trade; Learn Documentation Download Support 
Contribute Ecosystem Blog posts Socialize GE [...]
         "url": "wiki/GEP-15.html",
         "site": "dev"
     },
diff --git a/wiki/GEP-15.html b/wiki/GEP-15.html
index 2c9fc70..6813791 100644
--- a/wiki/GEP-15.html
+++ b/wiki/GEP-15.html
@@ -322,10 +322,14 @@ This requires <code>x</code> to be reassignable.</p>
 </ol>
 </div>
 <div class="paragraph">
-<p>When both <code>plusAssign</code> and <code>plus</code> exist on the same 
type, <code>plusAssign</code>
-takes precedence. This is the pragmatic choice for Groovy since it lacks
-Kotlin&#8217;s <code>val</code>/<code>var</code> distinction. If a class 
author defined <code>plusAssign</code>,
-they intended it to be used for <code>+=</code>.</p>
+<p>When both <code>plusAssign</code> and <code>plus</code> exist on the same
+type, <code>plusAssign</code> takes precedence.
+Languages like Kotlin apply an ambiguity resolution rule
+where the selection between <code>plusAssign</code> and <code>plus</code>
+depends on the mutability of the receiver (<code>val</code> vs 
<code>var</code>).
+This is not typical for Groovy method selection.
+If a class author defined <code>plusAssign</code>,
+they intend it to be used for <code>+=</code>.</p>
 </div>
 </div>
 <div class="sect2">
@@ -399,7 +403,7 @@ bus.listeners &lt;&lt;= "listener1"  // calls 
listeners.leftShiftAssign("listene
 <p>In <code>@CompileStatic</code> mode, the type checker resolves 
<code>plusAssign</code> at
 compile time using <code>findMethod()</code>. If found, it records the target 
method
 on the expression via node metadata and the bytecode generator emits a
-direct method call&#8201;&#8212;&#8201;no dup, no store-back.</p>
+direct method call with no reassignment to the variable.</p>
 </div>
 <div class="paragraph">
 <p>If not found, the existing desugaring to <code>x = x.plus(y)</code> 
applies.</p>
@@ -410,7 +414,7 @@ direct method call&#8201;&#8212;&#8201;no dup, no 
store-back.</p>
 <div class="paragraph">
 <p>In dynamic Groovy, the runtime checks for <code>plusAssign</code> via the 
Meta-Object
 Protocol (MOP). If <code>respondsTo(target, "plusAssign", arg)</code> 
succeeds, it is
-called. Otherwise, the fallback to <code>plus</code> + reassignment 
applies.</p>
+called. Otherwise, the fallback to <code>plus</code> with reassignment 
applies.</p>
 </div>
 <div class="paragraph">
 <p>This requires a new runtime helper method (e.g., in 
<code>ScriptBytecodeAdapter</code>)

Reply via email to