diff options
Diffstat (limited to 'spec/06-expressions.md')
-rw-r--r-- | spec/06-expressions.md | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/spec/06-expressions.md b/spec/06-expressions.md index 581170c5f9..9e49dfa199 100644 --- a/spec/06-expressions.md +++ b/spec/06-expressions.md @@ -222,9 +222,14 @@ the linearization of class `D` is `{D, B, A, Root}`. Then we have: ```scala -(new A).superA == "Root", - (new C).superB = "Root", (new C).superC = "B", -(new D).superA == "Root", (new D).superB = "A", (new D).superD = "B", +(new A).superA == "Root" + +(new C).superB == "Root" +(new C).superC == "B" + +(new D).superA == "Root" +(new D).superB == "A" +(new D).superD == "B" ``` Note that the `superB` function returns different results @@ -455,7 +460,7 @@ $e$. Type applications can be omitted if [local type inference](#local-type-inference) can infer best type parameters -for a polymorphic functions from the types of the actual function arguments +for a polymorphic function from the types of the actual function arguments and the expected result type. ## Tuples |