Skip to content

Add references to issues #2601

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 1 commit into from
May 30, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
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
7 changes: 3 additions & 4 deletions docs/docs/reference/adts.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ enum Color(val rgb: Int) {
}
```

## Syntax of Enums
### Syntax of Enums

Changes to the syntax fall in two categories: enum classes and cases inside enums.
The changes are specified below as deltas with respect to the Scala syntax given [here](https://github.com/lampepfl/dotty/blob/master/docs/docs/internals/syntax.md)
Expand All @@ -116,7 +116,6 @@ The changes are specified below as deltas with respect to the Scala syntax given
ClsParamClauses TemplateOpt
TemplateStat ::= ... | EnumCaseStat

### Reference




For more info, see [Issue #1970](https://github.com/lampepfl/dotty/issues/1970).
4 changes: 2 additions & 2 deletions docs/docs/reference/auto-parameter-tupling.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ Generally, a function value with `n > 1` parameters is converted to a
pattern-matching closure using `case` if the expected type is a unary
function type of the form `((T_1, ..., T_n)) => U`.

### Reference



For more info, see [Issue #897](https://github.com/lampepfl/dotty/issues/897).
3 changes: 2 additions & 1 deletion docs/docs/reference/changed/implicit-conversions.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ is no longer legal and has to be rwritten to
val x: B = a // OK
}

### Reference


For more info, see [PR #2065](https://github.com/lampepfl/dotty/pull/2065).

6 changes: 5 additions & 1 deletion docs/docs/reference/changed/structural-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ the cast lies about the structure of the record, the corresponding
likely be part if a database access layer which would ensure its
correctness.

## Notes:
### Notes:

1. The scheme does not handle polymorphic methods in structural
refinements. Such polymorphic methods are currently flagged as
Expand All @@ -127,3 +127,7 @@ differences.
takes class tags indicating the method's formal parameter types as
additional argument. `Dynamic` comes with `applyDynamic` and
`updateDynamic` methods, which take actual argument values.

### Reference

For more info, see [Issue #1886](https://github.com/lampepfl/dotty/issues/1886).
4 changes: 2 additions & 2 deletions docs/docs/reference/desugarEnums.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ comma separated simple cases into a sequence of cases.
Any modifiers or annotations on the original case extend to all expanded
cases.

## Equality
### Equality

An `enum` type contains a `scala.Eq` instance that restricts values of the `enum` type to
be compared only to other values of the same enum type. Furtermore, generic
Expand All @@ -147,7 +147,7 @@ be compared only to other values of the same enum type. Furtermore, generic

implicit def eqOption[T, U](implicit ev1: Eq[T, U]): Eq[Option[T], Option[U]] = Eq

## Translation of Enumerations
### Translation of Enumerations

Non-generic enum classes `E` that define one or more singleton cases
are called _enumerations_. Companion objects of enumerations define
Expand Down
12 changes: 8 additions & 4 deletions docs/docs/reference/enums.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ object Color {
}
```

## Parameterized enums
### Parameterized enums

Enum classes can be parameterized.

Expand All @@ -41,7 +41,7 @@ enum Color(val rgb: Int) {
As the example shows, you can define the parameter value by using an
explicit extends clause.

## Methods defined for enums
### Methods defined for enums

The values of an enum correspond to unique integers. The integer
associated with an enum value is returned by its `enumTag` method:
Expand All @@ -67,7 +67,7 @@ scala> Color.enumValues
val res3: collection.Iterable[Color] = MapLike(Red, Green, Blue)
```

## User-defined members of enums
### User-defined members of enums

It is possible to add your own definitions to an enum class or its
companion object. To make clear what goes where you need to use the
Expand Down Expand Up @@ -101,7 +101,7 @@ object Planet {
}
```

## Implementation
### Implementation

Enum classes are represented as `sealed` classes that extend the `scala.Enum` trait.
This trait defines a single method, `enumTag`:
Expand Down Expand Up @@ -137,3 +137,7 @@ definition of value `Color.Red` above would expand to:
```scala
val Red: Color = $new(0, "Red")
```

### Reference

For more info, see [Issue #1970](https://github.com/lampepfl/dotty/issues/1970).
4 changes: 4 additions & 0 deletions docs/docs/reference/implicit-by-name-parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,7 @@ val s = implicitly[Test.Codec[Option[Int]]](
```

No lazy val was generated because the synthesized argument is not recursive.

### Reference

For more info, see [Issue #1998](https://github.com/lampepfl/dotty/issues/1998.)
4 changes: 4 additions & 0 deletions docs/docs/reference/implicit-function-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,7 @@ With that setup, the table construction code above compiles and expands to:
cell("bottom right")($r)
}($t)
}

### Reference

For more info, see the [blog article](https://www.scala-lang.org/blog/2016/12/07/implicit-function-types.html).
6 changes: 5 additions & 1 deletion docs/docs/reference/inline.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ overhead:
}
}

## Relationship to `@inline`.
### Relationship to `@inline`.

Existing Scala defines a `@inline` annotation which is used as a hint
for the backend to inline. For most purposes, this annotation is
Expand All @@ -125,6 +125,10 @@ it in backticks, i.e.
@`inline` def ...


### Reference

For more info, see [PR #1492](https://github.com/lampepfl/dotty/pull/1492) and
[Scala SIP 28](http://docs.scala-lang.org/sips/pending/inline-meta.html)



6 changes: 5 additions & 1 deletion docs/docs/reference/multiversal-equality.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,8 @@ The precise rules for equality checking are as follows.
not eligible is successful.

More on multiversal equality is found in a [blog post]
and a [Github issue].
and a [Github issue].

### Reference

For more info, see [Issue #1247](https://github.com/lampepfl/dotty/issues/1247).
2 changes: 2 additions & 0 deletions docs/docs/reference/trait-parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,6 @@ The correct way to write `E` is to extend both `Greeting` and
class E extends Greeting("Bob") with FormalGreeting
```

### Reference

For more info, see [Scala SIP 25](http://docs.scala-lang.org/sips/pending/trait-parameters.html).