ceylon/ceylon-compiler — Issue #377: Decl.isLocal() is broken
Author: tombentley
Created: 2012-02-16 14:21:26+00:00
State: open

It currently does this:

return decl.getContainer() instanceof MethodOrValue;

The problem is that `decl.getContainer()` returns a `Scope` but `MethodOrValue` doesn't inherit `Scope`, so the test can never be true!

Also surely the test for localness needs to search upward through the scope hierarchy until it finds a `Method`, `Getter` or `Setter`? So that a decl in a `ControlBlock` is also considered a local, for instance.

Do we also have to worry about non-captured attributes declared in a class initilzer?