[Mono-bugs] [Bug 74939][Wis] Changed - CS1028 when there is an #if
for the #endif
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Sat May 14 02:02:49 EDT 2005
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by duncan at ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=74939
--- shadow/74939 2005-05-13 18:12:47.000000000 -0400
+++ shadow/74939.tmp.20539 2005-05-14 02:02:49.000000000 -0400
@@ -47,6 +47,48 @@
#else
(UCOMIStream)
#endif
If I move the parentheses out of the conditional code it compiles
without errors.
+
+------- Additional Comments From duncan at ximian.com 2005-05-14 02:02 -------
+Here's a simpler test case:
+
+1 interface IFoo {}
+2 interface IBar : IFoo {}
+3
+4 class A : IFoo, IBar {}
+5
+6 class X {
+7 static void Main ()
+8 {
+9 A a = new A ();
+10 IFoo b =
+11 #if FOO
+12 (IFoo)
+13 #else
+14 (IBar)
+15 #endif
+16 a;
+17 }
+18 }
+
+With some debugging code inserted, here's what I see:
+
+mcs -debug 74939.cs
+handle_preprocessing_directive, c is '#' at 11
+cont is False
+round we go again
+handle_preprocessing_directive, c is '#' at 13
+#else: 1
+cont is True
+handle_preprocessing_directive, c is '#' at 15
+cont is True
+handle_preprocessing_directive, c is '#' at 17
+74939.cs(18) error CS1028: Unexpected processor directive (no #if for
+this #endif)
+cont is True
+Compilation failed: 1 error(s), 0 warnings
+
+For some reason, we're calling handle_preprocessing_directive even
+after we're done with them (at line 17)
More information about the mono-bugs
mailing list