[Mono-bugs] [Bug 58254][Min] New - Using /main:ClassName with nonexisting name does not complain

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 10 May 2004 00:11:50 -0400 (EDT)

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 sebastian@nowozin.de.


--- shadow/58254	2004-05-10 00:11:50.000000000 -0400
+++ shadow/58254.tmp.27515	2004-05-10 00:11:50.000000000 -0400
@@ -0,0 +1,47 @@
+Bug#: 58254
+Product: Mono: Compilers
+Version: unspecified
+OS Details: 
+Status: NEW   
+Priority: Minor
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: sebastian@nowozin.de               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: Using /main:ClassName with nonexisting name does not complain
+Description of Problem:
+Using the mcs /main command line option with a misspelled or non-existing
+classname does not complain, but behaves as if the program does not have a
+Main at all. Not having a Main can have many reasons (eg. missing some
+sourcefiles on the commandline), but imho the compiler can easily tell in
+the misspelled case that the reason is simply the class with the given name
+in /main does not exist. I know this is a rather minor issue.
+Steps to reproduce the problem, using the attached "maintest.cs":
+1. mcs /main:Maintest maintest.cs
+2. mcs /main:MainTest maintest.cs
+Actual Results:
+$:/tmp/mcs$ mcs /main:Maintest maintest.cs
+error CS5001: Program maintest.exe does not have an entry point defined
+Compilation failed: 1 error(s), 0 warnings
+$:/tmp/mcs$ mcs /main:MainTest maintest.cs
+Compilation succeeded
+Expected Results:
+Something like, "Specified main class 'Maintest' not found, no entry point
+How often does this happen?