groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pa...@apache.org
Subject groovy git commit: Documentation: traits vs default methods: clarify difference (closes #660)
Date Fri, 23 Feb 2018 10:49:11 GMT
Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_5_X 28a9a8053 -> cc9758544


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


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/cc975854
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/cc975854
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/cc975854

Branch: refs/heads/GROOVY_2_5_X
Commit: cc97585444b71e9eba377d02c26c07c02063c8de
Parents: 28a9a80
Author: Martin Gansler <martin.gansler@codecentric.de>
Authored: Thu Feb 8 08:27:41 2018 +0100
Committer: paulk <paulk@asert.com.au>
Committed: Fri Feb 23 20:48:58 2018 +1000

----------------------------------------------------------------------
 src/spec/doc/core-traits.adoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/cc975854/src/spec/doc/core-traits.adoc
----------------------------------------------------------------------
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.


Mime
View raw message