[Mono-devel-list] Nested namesapce Bug (#40833)
Gaurav Vaish
gvaish at adobe.com
Thu Apr 10 03:01:56 EDT 2003
Hi,
I have almost done it.
The only places where it fails is when a namespace of the same name is
declared after a type has already been declared. See attached file for what
I mean. inner_ns_fails.cs failes to compile - expected behaviour.
inner_ns.cs compiles - should not.
The reason is that I don't have the information about "Location" when
the namespace in error is loaded. Frankly speaking, namespace should not
have Location - since it can be spread to many files. So, I need to get
information of the previously declared non-namespace object. Currently, my
hack fails to do so, but still - it does *not* compile the attached files
(expected behaviour, only error handling is bad).
The file mcs_mcs.diff contains the changes that I've done. And
AssemblyObjectNames.cs is the new class that I've added.
I've build all the assemblies with new mcs and currently running tests /
errors. Seems to be going fine till now (tests: 160, errors: 255 done).
Let me know if I can apply the patch.
Happy Hacking,
Gaurav
http://mastergaurav.virtualave.net/iitk
---------------------------------------
Compilation Results ==>
--------------------------------------
gvaish at MASTER /cygdrive/f/gvaish/projects/csdoc/csdoc/src/tests
$ ../csdoc/mcsdoc.exe inner_ns.cs
inner_ns.cs(5) error CS0101: Failed to add namespace: One.Two
Compilation failed: 1 error(s), 0 warnings
gvaish at MASTER /cygdrive/f/gvaish/projects/csdoc/csdoc/src/tests
$ ../csdoc/mcsdoc.exe inner_ns_fails.cs
Internal(1) error CS0101: Failed to add "One.Two"
Compilation failed: 1 error(s), 0 warnings
--------------------------------------
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: inner_ns_fails.cs
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20030410/fcdaddf2/attachment.pl
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: inner_ns.cs
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20030410/fcdaddf2/attachment-0001.pl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mcs_mcs.diff
Type: application/octet-stream
Size: 1709 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20030410/fcdaddf2/attachment.obj
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: AssemblyObjectNames.cs
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20030410/fcdaddf2/attachment-0002.pl
More information about the Mono-devel-list
mailing list