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 2015/08/31 20:25:30 UTC

incubator-groovy git commit: Documentation: Added that default must be last in switch case (closes #82)

Repository: incubator-groovy
Updated Branches:
  refs/heads/master 048b35b6c -> 04b8b7b44


Documentation: Added that default must be last in switch case (closes #82)


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

Branch: refs/heads/master
Commit: 04b8b7b44140f242132687a5da1450da280abad6
Parents: 048b35b
Author: Aseem Bansal <an...@users.noreply.github.com>
Authored: Sun Aug 9 14:26:57 2015 +0530
Committer: pascalschumacher <pa...@gmx.net>
Committed: Mon Aug 31 20:24:10 2015 +0200

----------------------------------------------------------------------
 src/spec/doc/core-differences-java.adoc | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-groovy/blob/04b8b7b4/src/spec/doc/core-differences-java.adoc
----------------------------------------------------------------------
diff --git a/src/spec/doc/core-differences-java.adoc b/src/spec/doc/core-differences-java.adoc
index d0cbf0c..32aa8ac 100644
--- a/src/spec/doc/core-differences-java.adoc
+++ b/src/spec/doc/core-differences-java.adoc
@@ -277,3 +277,7 @@ variable names etc.
 * `def`
 * `in`
 * `trait`
+
+== default must be last in switch case
+
+`default` must go at the end of the switch/case. While in Java the default can be placed anywhere in the switch/case, the `default` in Groovy is used more as an else than assigning a default case.