diff options
author | Simon Ochsenreither <simon@ochsenreither.de> | 2014-09-16 18:48:09 +0200 |
---|---|---|
committer | Simon Ochsenreither <simon@ochsenreither.de> | 2015-04-25 03:37:40 +0200 |
commit | 62db8d98559766c06d490d9d4c18ff27587fde0b (patch) | |
tree | a2c6b72094a214b9ef99c8097759da0aba5ace51 /spec/08-pattern-matching.md | |
parent | d030172d7ef807d85391d32c5456b1b97b15a402 (diff) | |
download | scala-62db8d98559766c06d490d9d4c18ff27587fde0b.tar.gz scala-62db8d98559766c06d490d9d4c18ff27587fde0b.tar.bz2 scala-62db8d98559766c06d490d9d4c18ff27587fde0b.zip |
Spec improvements
Diffstat (limited to 'spec/08-pattern-matching.md')
-rw-r--r-- | spec/08-pattern-matching.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/08-pattern-matching.md b/spec/08-pattern-matching.md index e75bddc096..c494fbcef5 100644 --- a/spec/08-pattern-matching.md +++ b/spec/08-pattern-matching.md @@ -371,7 +371,7 @@ bound type variables in a typed pattern or constructor pattern. Inference takes into account the expected type of the pattern. -### Type parameter inference for typed patterns. +### Type parameter inference for typed patterns Assume a typed pattern $p: T'$. Let $T$ result from $T'$ where all wildcards in $T'$ are renamed to fresh variable names. Let $a_1 , \ldots , a_n$ be @@ -437,7 +437,7 @@ complexity of inferred bounds. Minimality and maximality of types have to be understood relative to the set of types of acceptable complexity. -#### Type parameter inference for constructor patterns. +### Type parameter inference for constructor patterns Assume a constructor pattern $C(p_1 , \ldots , p_n)$ where class $C$ has type type parameters $a_1 , \ldots , a_n$. These type parameters are inferred in the same way as for the typed pattern @@ -593,7 +593,7 @@ the compilation of pattern matching can emit warnings which diagnose that a given set of patterns is not exhaustive, i.e. that there is a possibility of a `MatchError` being raised at run-time. -### Example +###### Example Consider the following definitions of arithmetic terms: |