well importing in a local block/function has nothing to do with runtime 
importing. Just see scala import.

[https://en.wikibooks.org/wiki/Scala/Import](https://en.wikibooks.org/wiki/Scala/Import)

and yes for your case use a when clause. The content of a when brach is at top 
level it does not create a new scope.

Reply via email to