This is an automated email from the ASF dual-hosted git repository.
paulk pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/groovy-website.git
The following commit(s) were added to refs/heads/asf-site by this push:
new cb9f767 minor enhancement
cb9f767 is described below
commit cb9f7676fa5fcf451724895d18ee14124e0ce8db
Author: Paul King <[email protected]>
AuthorDate: Tue Apr 7 15:18:30 2026 +1000
minor enhancement
---
site/src/site/releasenotes/groovy-6.0.adoc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/site/src/site/releasenotes/groovy-6.0.adoc
b/site/src/site/releasenotes/groovy-6.0.adoc
index 43c4537..b67bd63 100644
--- a/site/src/site/releasenotes/groovy-6.0.adoc
+++ b/site/src/site/releasenotes/groovy-6.0.adoc
@@ -863,6 +863,7 @@ no field assignments at all.
@Invariant({ count >= 0 })
class Counter {
int count
+ String label
@Modifies({ [this.count] })
void increment() { count++ } // ok: count is declared
@@ -871,7 +872,7 @@ class Counter {
int value() { count } // ok: no mutations
@Modifies({ [this.count] })
- void oops() { count++; other = 1 } // compile error: 'other' not in
@Modifies
+ void oops() { count++; label = 'x' } // compile error: 'label' not in
@Modifies
}
----