You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/reference/adts.md
+5-2Lines changed: 5 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -22,8 +22,8 @@ be given explicitly:
22
22
23
23
```scala
24
24
enumOption[+T] {
25
-
caseSome[T](x: T) extendsOption[T]
26
-
caseNoneextendsOption[Nothing]
25
+
caseSome[+T](x: T) extendsOption[T]
26
+
caseNoneextendsOption[Nothing]
27
27
}
28
28
```
29
29
@@ -94,6 +94,9 @@ enum Color(val rgb: Int) {
94
94
95
95
## Syntax of Enums
96
96
97
+
Changes to the syntax fall in two categories: enum classes and cases inside enums.
98
+
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)
99
+
97
100
1. Enum definitions and enum classes are defined as follows:
0 commit comments