Assembly attributes before types #73

Closed
erik-kallen wants to merge 2 commits from AssemblyAttributesBeforeTypes into master
erik-kallen commented 2012-07-01 06:47:01 -05:00 (Migrated from github.com)

In declarations like this:

[assembly: SomeAttribute()]
public class C {}

the attribute will be added to the type.

Failing test and fix in separate commits.

In declarations like this: ``` [assembly: SomeAttribute()] public class C {} ``` the attribute will be added to the type. Failing test and fix in separate commits.
dgrunwald commented 2012-07-01 06:50:18 -05:00 (Migrated from github.com)

Actually I think this is a parser bug; assembly attributes should be top-level nodes, and not be part of TypeDeclaration.Attributes.

Actually I think this is a parser bug; assembly attributes should be top-level nodes, and not be part of TypeDeclaration.Attributes.
erik-kallen commented 2013-01-28 16:23:12 -06:00 (Migrated from github.com)

What is happening with this issue? I don't feel comfortable hacking the parser myself, as that is code which I have touched very little.

What is happening with this issue? I don't feel comfortable hacking the parser myself, as that is code which I have touched very little.
mkrueger commented 2013-09-12 02:28:55 -05:00 (Migrated from github.com)

I think my work around fixes that - let's close the issue for now.

I think my work around fixes that - let's close the issue for now.
erik-kallen commented 2013-09-29 03:20:39 -05:00 (Migrated from github.com)

The test is ignored (and fails) in master, and your workaround seems to have been reverted in 4984985673

The test is ignored (and fails) in master, and your workaround seems to have been reverted in 4984985673d884ea5608f9b5919012d375346b36
erik-kallen commented 2013-09-29 03:20:56 -05:00 (Migrated from github.com)

(I want to reopen, but I seem to not have the rights to do that)

(I want to reopen, but I seem to not have the rights to do that)
dgrunwald commented 2013-11-06 09:13:26 -06:00 (Migrated from github.com)

The corresponding mcs bug was closed: https://bugzilla.xamarin.com/show_bug.cgi?id=12204

However, this is still an issue. I can reproduce it whenever there are two or more assembly/module attribute sections; with just a single section the issue does not occur anymore.

using System;
[module: A]
[module: B]
class Test {}

The 'A' attribute will be in global scope as expected, but the 'B' attribute is attached to the type declaration.

The corresponding mcs bug was closed: https://bugzilla.xamarin.com/show_bug.cgi?id=12204 However, this is still an issue. I can reproduce it whenever there are two or more assembly/module attribute sections; with just a single section the issue does not occur anymore. ``` using System; [module: A] [module: B] class Test {} ``` The 'A' attribute will be in global scope as expected, but the 'B' attribute is attached to the type declaration.

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-icsharpcode/NRefactory!73
No description provided.