Closed marcusklang closed 2 years ago
{ val b = a; val a = 42; }
Compiles and works, but in Scala 2 you were given a warning. In Scala 3 you are not given a warning.
b is given the value 0.
Update compendium answers for exercise 4.2 to reflect changes.
https://docs.scala-lang.org/scala3/reference/other-new-features/safe-initialization.html
https://github.com/lampepfl/dotty/issues/16083
Compiles and works, but in Scala 2 you were given a warning. In Scala 3 you are not given a warning.
b is given the value 0.
Update compendium answers for exercise 4.2 to reflect changes.