fbgava (1) [Avatar] Offline
#1
Hi,

After trying the code listed in Quick check 4.4, I'm getting a different output from the provided answer.

My code:

scala> :paste
// Entering paste mode (ctrl-D to finish)

var a = b
val b = "hello"
a.length

// Exiting paste mode, now interpreting.

<console>:11: warning: Reference to uninitialized value b
       var a = b
               ^
java.lang.NullPointerException
  ... 37 elided


Is this happening because I'm using a more recent Scala version (2.12.3)?

Thanks.
Daniela Sfregola (8) [Avatar] Offline
#2
Hi @fbgava,
I just had a look and it seems like the answer to the quick check is wrong. Nothing to do with your Scala version smilie

I'll make sure to fix it as soon as possible!

Cheers,
Daniela