From 46009b17ed3e5d07a6662b0cf0f71b4512798cd3 Mon Sep 17 00:00:00 2001 From: todesking Date: Thu, 24 Sep 2015 00:26:09 +0900 Subject: Add view/context-bound parameter ordering rule --- spec/07-implicits.md | 10 ++++++++++ 1 file changed, 10 insertions(+) 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: -- cgit v1.2.3