summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortodesking <discommunicative@gmail.com>2015-09-24 00:26:09 +0900
committertodesking <discommunicative@gmail.com>2015-09-24 00:26:09 +0900
commit46009b17ed3e5d07a6662b0cf0f71b4512798cd3 (patch)
treeac4ad57d23229f27803e5e3c4f65a7634e51e912
parent6eba305df84b1f1b364580036da0bba313da24c6 (diff)
downloadscala-46009b17ed3e5d07a6662b0cf0f71b4512798cd3.tar.gz
scala-46009b17ed3e5d07a6662b0cf0f71b4512798cd3.tar.bz2
scala-46009b17ed3e5d07a6662b0cf0f71b4512798cd3.zip
Add view/context-bound parameter ordering rule
-rw-r--r--spec/07-implicits.md10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/07-implicits.md b/spec/07-implicits.md
index 1e687819d5..784de969a8 100644
--- a/spec/07-implicits.md
+++ b/spec/07-implicits.md
@@ -358,6 +358,16 @@ in one implicit parameter section. Since traits do not take
constructor parameters, this translation does not work for them.
Consequently, type-parameters in traits may not be view- or context-bounded.
+Evidence parameters are prepended to the existing implicit parameter section, if one exists.
+
+For example:
+
+```scala
+def foo[A: M](implicit b: B): C
+// expands to:
+// def foo[A](implicit evidence$1: M[A], b: B): C
+```
+
###### Example
The `<=` method from the [`Ordered` example](#example-ordered) can be declared
more concisely as follows: