logo       

[jira] Updated: (BOO-450) Error msg when accessing non-static outer class m: msg#00124

lang.boo.devel

Subject: [jira] Updated: (BOO-450) Error msg when accessing non-static outer class member

[ http://jira.codehaus.org/browse/BOO-450?page=all ]

Doug Holton updated BOO-450:
----------------------------

Attachment: boo-450.patch

Put in patch form with test case.

> Error msg when accessing non-static outer class member
> ------------------------------------------------------
>
> Key: BOO-450
> URL: http://jira.codehaus.org/browse/BOO-450
> Project: Boo
> Type: Bug
> Components: Compiler
> Versions: 0.5.6
> Reporter: Doug Holton
> Assignee: Rodrigo B. de Oliveira
> Attachments: boo-450.patch
>
>
> See:
> http://groups-beta.google.com/group/boolang/browse_frm/thread/5668b195c6dec549/0939ef078aed3db3#0939ef078aed3db3
> 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)))
> {
>
> Error(CompilerErrorFactory.InstanceRequired(node,
>
> member.DeclaringType.ToString(),
> member.Name));
> }
> That 'fix' doesn't change name resolution though, to exclude non-static
> members in outer classes.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise