Following is 2 lines of code:
def name = "Neo"
println name
If I execute it in groovysh
, I will get Unknown property: name
error.
If I execute it in groovyConsole
, everything goes on well.
If you want features from Groovy 2.4.0 you can use
:set interpreterMode true
to see a difference. :)
groovy:000> def a = 10
===> 10
groovy:000> a
Unknown property: a
groovy:000> :set interpreterMode true
groovy:000> a
Unknown property: a
groovy:000> def b = 100
===> 100
groovy:000> b
===> 100
groovy:000>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With