@@ -103,14 +103,14 @@ even if they are imported (directly, or by renaming). For example:
103
103
``` scala
104
104
import Planet .*
105
105
enum Planet (mass : Double , radius : Double ):
106
- private final val (MercuryMass @ _, MercuryRadius @ _ ) = (3.303e+23 , 2.4397e6 )
106
+ private final val (mercuryMass, mercuryRadius ) = (3.303e+23 , 2.4397e6 )
107
107
108
- case Mercury extends Planet (MercuryMass , MercuryRadius ) // Not found
109
- case Venus extends Planet (VenusMass , VenusRadius ) // illegal reference
110
- case Earth extends Planet (Planet .EarthMass , Planet .EarthRadius ) // ok
108
+ case Mercury extends Planet (mercuryMass, mercuryRadius ) // Not found
109
+ case Venus extends Planet (venusMass, venusRadius ) // illegal reference
110
+ case Earth extends Planet (Planet .earthMass , Planet .earthRadius ) // ok
111
111
object Planet :
112
- private final val (VenusMass @ _, VenusRadius @ _ ) = (4.869e+24 , 6.0518e6 )
113
- private final val (EarthMass @ _, EarthRadius @ _ ) = (5.976e+24 , 6.37814e6 )
112
+ private final val (venusMass, venusRadius ) = (4.869e+24 , 6.0518e6 )
113
+ private final val (earthMass, earthRadius ) = (5.976e+24 , 6.37814e6 )
114
114
end Planet
115
115
```
116
116
The fields referenced by ` Mercury ` are not visible, and the fields referenced by ` Venus ` may not
0 commit comments