Wednesday, 15 February 2012

scala - Calling an inner function? -



scala - Calling an inner function? -

i trying phone call inner function so...

scala> def myouter() = { | def myinner() { | println("in inner now") | } | | } myouter: ()type scala> myouter().myinner() <console>:9: error: value myinner not fellow member of object $iw myouter().myinner() ^

any tips on how accomplish this?

you can't. inner functions private scope in declared.

scala

No comments:

Post a Comment