Details
Description
Boo should throw an error if accessing a non-static member of outer class. (Actually, C# just says the reference cannot be found I believe)
One fix is around line 2029 in the processmethodbodies step, add:
//check if found entity can't possibly be a member of self:
if (member.DeclaringType != CurrentType &&
!(CurrentType.IsSubclassOf(member.DeclaringType)))
That 'fix' doesn't change name resolution though, to exclude non-static members in outer classes.
C# shows this error:
error CS0038: Cannot access a nonstatic member of outer type 'OuterClass' via nested type 'OuterClass.InnerClass'