groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject groovy git commit: Documentation: traits vs default methods: clarify difference (closes #660)
Date Fri, 23 Feb 2018 10:48:40 GMT
Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_6_X 3fc2df2ac -> eeff2a4d4

Documentation: traits vs default methods: clarify difference (closes #660)


Branch: refs/heads/GROOVY_2_6_X
Commit: eeff2a4d4c45808ceb8e69bd86a78fb01ecdcb8d
Parents: 3fc2df2
Author: Martin Gansler <>
Authored: Thu Feb 8 08:27:41 2018 +0100
Committer: paulk <>
Committed: Fri Feb 23 20:48:28 2018 +1000

 src/spec/doc/core-traits.adoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/spec/doc/core-traits.adoc b/src/spec/doc/core-traits.adoc
index 5bd17ce..61f66b4 100644
--- a/src/spec/doc/core-traits.adoc
+++ b/src/spec/doc/core-traits.adoc
@@ -562,7 +562,7 @@ include::{projectdir}/src/spec/test/TraitsSpecificationTest.groovy[tags=sam_trai
 In Java 8, interfaces can have default implementations of methods. If a class implements
an interface and does not provide
 an implementation for a default method, then the implementation from the interface is chosen.
Traits behave the same but
 with a major difference: the implementation from the trait is *always* used if the class
declares the trait in its interface
-list *and* that it doesn't provide an implementation.
+list *and* that it doesn't provide an implementation *even* if a super class does.
 This feature can be used to compose behaviors in an very precise way, in case you want to
override the behavior of an
 already implemented method.

View raw message