You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2018/02/23 10:47:50 UTC

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

Repository: groovy
Updated Branches:
  refs/heads/master 4019ee00e -> e248935c4


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/e248935c
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/e248935c
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/e248935c

Branch: refs/heads/master
Commit: e248935c4750745542a370e35aba124058e8f3cb
Parents: 4019ee0
Author: Martin Gansler <ma...@codecentric.de>
Authored: Thu Feb 8 08:27:41 2018 +0100
Committer: paulk <pa...@asert.com.au>
Committed: Fri Feb 23 20:47:13 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/e248935c/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.