dotgnu-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [DotGNU]<PNET> Order of Classes in Source file


From: Rhys Weatherley
Subject: Re: [DotGNU]<PNET> Order of Classes in Source file
Date: Wed, 23 Jan 2002 10:27:22 +1000

"Gopal.V" wrote:

> Hi Rhys,
>         I have been working on C#, and am confused on one small aspect.
> Does C# enforce that referenced classes should be defined before it
> is used ?. ilrun refuses to run such programs where the used class
> is specified after the reference by throwing a "NullReferenceException".

Classes can be declared in any order.  The type gathering
phase in "cs_gather.c" straightens everything out.

Turns out this was a bug in the linker (ilalink).  The linker
was not copying the public/private/protected permission
information on "HTTPResponse"'s constructor, because
of the forward reference.

This linker bug caused the engine to get confused: it thought
that the class didn't have a constructor at all, and so bailed
out with an exception.  Nicely spotted.  The fix is in CVS.

>         Also , should we move such discussions off the list or report
> in savannah ....etc.

How about we do both for the time being: discuss it on
the mailing list _and_ file a bug report?  The volume of
bugs is low at the moment, and there are others who may
be interested in seeing how the process of "discover,
report, fix, respond" should work.  Logging the bug makes
it easier for me to track.

Cheers,

Rhys.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]