[IronPython] Compilation error
dinov at exchange.microsoft.com
Tue Oct 23 19:04:03 CEST 2007
Ok, after a little back and forth, here's what I've founded out:
The spec is a little unclear in that it doesn't mention whether private members need to be assigned or not. All the spec says is:
* A struct-type variable is considered definitely assigned if each of its instance variables is considered definitely assigned.
And doesn't mention private members at all (of course one could argue therefore private members need assignment :) ).
The current interpretation by csc is that private members need to be assigned, but it never looks at the private members of a struct in an external assembly - so it just doesn't see them. That leads to the difference in behavior between members in the same assembly and in another assembly.
I've been told the C# team is going to look at this after Orcas and will need to investigate what the proper behavior is. But it doesn't seem to be clear to them whether they should require assignment for private members or not require assignment for private members.
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Sanghyeon Seo
Sent: Wednesday, October 17, 2007 6:58 PM
To: Discussion of IronPython
Subject: Re: [IronPython] Compilation error
2007/10/6, Dino Viehland <dinov at exchange.microsoft.com>:
> BTW my simple repro is bogus - it contains no members and section 5.3 of the C# spec defines value types as being definitely assigned when all their members are assigned. The real issue seems to be when the value-type is defined in another assembly and all the members are private. Once those conditions are met csc then doesn't require the assignment.
> I'm still waiting for a response on that last bit.
Gert Driesen from Mono project reported this as Feedback 304489 at
After 3 days, it was marked "Resolved (By Design)", without any
explanation. I'm still curious.
Users mailing list
Users at lists.ironpython.com
More information about the Ironpython-users