Skip to content

fix indent so numbered list is continuous #4178

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 25, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 11 additions & 13 deletions docs/docs/reference/erased-terms.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,17 +152,17 @@ Rules
* In a method definition
* In a `val` definition (but not `lazy val` or `var`)

```scala
erased val x = ...
erased def f = ...
```scala
erased val x = ...
erased def f = ...

def g(erased x: Int) = ...
def g(erased x: Int) = ...

(erased x: Int) => ...
def h(x: erased Int => Int) = ...
(erased x: Int) => ...
def h(x: erased Int => Int) = ...

class K(erased x: Int) { ... }
```
class K(erased x: Int) { ... }
```


2. A reference to an `erased` definition can only be used
Expand All @@ -177,12 +177,11 @@ class K(erased x: Int) { ... }
* `(implicit erased T1, T2) => R <:< (erased T1, T2) => R`
* ...

Note that there is no subtype relation between `erased T => R` and `T => R` (or `implicit erased T => R` and `implicit T => R`)
Note that there is no subtype relation between `erased T => R` and `T => R` (or `implicit erased T => R` and `implicit T => R`)


4. Eta expansion

if `def f(erased x: T): U` then `f: (erased T) => U`.
if `def f(erased x: T): U` then `f: (erased T) => U`.
Copy link
Contributor

@allanrenucci allanrenucci Mar 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will be rendered on the same line as the previous line. So we might as well rewrite it as:

4. Eta expansion: if `def f(erased x: T): U` then `f: (erased T) => U`.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was not my intention, I'll revert this particular change



5. Erasure Semantics
Expand All @@ -193,8 +192,7 @@ if `def f(erased x: T): U` then `f: (erased T) => U`.


6. Overloading

Method with `erased` parameters will follow the normal overloading constraints after erasure.
Method with `erased` parameters will follow the normal overloading constraints after erasure.
Copy link
Contributor

@allanrenucci allanrenucci Mar 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would also put it on the previous line:

6. Overloading: methods with `erased` parameters will follow the normal overloading constraints after erasure.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here



7. Overriding
Expand Down