File tree 3 files changed +5
-4
lines changed
docs/_docs/reference/enums 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ below:
100
100
The following ` View ` enum has a contravariant type parameter ` T ` and a single case ` Refl ` , representing a function
101
101
mapping a type ` T ` to itself:
102
102
103
- ``` scala sc:fail
103
+ ``` scala sc:nocompile
104
104
enum View [- T ]:
105
105
case Refl (f : T => T )
106
106
```
@@ -118,7 +118,7 @@ function type, leading to the following error:
118
118
119
119
Because ` Refl ` does not declare explicit parameters, it looks to the compiler like the following:
120
120
121
- ``` scala sc:fail
121
+ ``` scala sc:nocompile
122
122
enum View [- T ]:
123
123
case Refl [/* synthetic*/ - T1 ](f : T1 => T1 ) extends View [T1 ]
124
124
```
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ enum class.
99
99
Similarly, enum case declarations may not directly reference members of the enum's companion object,
100
100
even if they are imported (directly, or by renaming). For example:
101
101
102
- ``` scala sc:fail
102
+ ``` scala sc:nocompile
103
103
import Planet .*
104
104
enum Planet (mass : Double , radius : Double ):
105
105
private final val (mercuryMass, mercuryRadius) = (3.303e+23 , 2.4397e6 )
Original file line number Diff line number Diff line change @@ -2362,7 +2362,8 @@ object ScaladocConfigs {
2362
2362
s " $dottyLibRoot/src/scala=compile " ,
2363
2363
s " $dottyLibRoot/src/scala/compiletime=compile " ,
2364
2364
s " $dottyLibRoot/src/scala/util=compile " ,
2365
- s " $dottyLibRoot/src/scala/util/control=compile "
2365
+ s " $dottyLibRoot/src/scala/util/control=compile " ,
2366
+ " docs/_docs/reference/enums=compile"
2366
2367
)))
2367
2368
.add(SiteRoot (" docs" ))
2368
2369
.add(ApiSubdirectory (true ))
You can’t perform that action at this time.
0 commit comments