aBothe / Mono-D

D Add-In for MonoDevelop
http://wiki.dlang.org/Mono-D
Other
113 stars 26 forks source link

Semicolon attributes should span the whole scope #549

Open etcimon opened 9 years ago

etcimon commented 9 years ago

example:

import std.stdio;

version(Something):
class A {
        static void print() { writeln("ACTIVE"); };
}

public:
void main() {
        writeln(A.print());
}

The compiler doesn't find main() here but it's not grayed out

aBothe commented 9 years ago

Where's the cursor where it can't find the main method?

etcimon commented 9 years ago

The problem is that it's not entirely grayed out. The graying stops at public: currently, wherever the cursor is

aBothe commented 9 years ago

Hold on, so the scope of version(Something) is the entire following code below this attribute? Hmm.

etcimon commented 9 years ago

Yes, my example shows this because the main won't show up in the executable.

aBothe commented 9 years ago

but wait, if there's a new version-condition, the old one becomes overwritten, right?

aBothe commented 9 years ago

Please try v2.5.2 - although an eventually occurring version(all) does not 'undo' the version(something), it should work better now