Skip to content

Commit 6712d14

Browse files
committed
Address reviewer comments
1 parent 603c2c8 commit 6712d14

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

docs/docs/reference/adts.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ be given explicitly:
2222

2323
```scala
2424
enum Option[+T] {
25-
case Some[T](x: T) extends Option[T]
26-
case None extends Option[Nothing]
25+
case Some[+T](x: T) extends Option[T]
26+
case None extends Option[Nothing]
2727
}
2828
```
2929

@@ -94,6 +94,9 @@ enum Color(val rgb: Int) {
9494

9595
## Syntax of Enums
9696

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+
97100
1. Enum definitions and enum classes are defined as follows:
98101

99102
TmplDef ::= `enum' `class’ ClassDef

0 commit comments

Comments
 (0)