[Mono-bugs] [Bug 72074][Nor] New - CS0011 is not reported when assembly containing base class or interface is not referenced

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 1 Feb 2005 14:56:29 -0500 (EST)


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 gert.driesen@pandora.be.

http://bugzilla.ximian.com/show_bug.cgi?id=72074

--- shadow/72074	2005-02-01 14:56:29.000000000 -0500
+++ shadow/72074.tmp.19335	2005-02-01 14:56:29.000000000 -0500
@@ -0,0 +1,64 @@
+Bug#: 72074
+Product: Mono: Compilers
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: gert.driesen@pandora.be               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: CS0011 is not reported when assembly containing base class or interface is not referenced
+
+(using Mono built from SVN)
+
+mcs does not report error CS0011 when an assembly containing a base type 
+or interface is not referenced.
+
+The root cause of this bug is probably a runtime issue ... but I'll leave 
+it up to you guys to sort this out.
+
+To reproduce this issue :
+
+1. Extract the attached gzipped tar archive
+2. Change to the extracted directory
+3. Execute 'make'.
+
+Actual Result:
+
+** (C:/cygwin/usr/local/lib/mono/1.0/mcs.exe:3056): WARNING **: Could not 
+find assembly assemblya, references from d:\mono-bugs\cs0011
+\assemblyb.dll (assemblyref_index=0)
+     Major/Minor: 0,0
+     Build:       0,0
+     Token:
+System error: No such file or directory
+
+** (C:/cygwin/usr/local/lib/mono/1.0/mcs.exe:3056): WARNING **: Could not 
+load class from NamespaceA.ClassA (token 0x01000001) in d:\mono-
+bugs\cs0011\assemblyb.dll
+
+This application has requested the Runtime to terminate it in an unusual 
+way.
+Please contact the application's support team for more information.
+
+Expected result (as reported by csc):
+
+assemblyb.dll: error CS0011: Referenced class 'NamespaceB.ClassB' has 
+base class or interface 'NamespaceA.ClassA' defined in an assembly that 
+is not referenced.  You must add a reference to assembly 'assemblya'.
+
+Note:
+
+To see the expected behaviour, extract the attached archive on Windows 
+and execute the make file with parameter MCS=csc (on cygwin).
+
+eg.
+
+drieseng@home /cygdrive/d/mono-bugs/cs0011 $ make MCS=csc