https://bugzilla.novell.com/show_bug.cgi?id=474252


           Summary: Invalid exception from Mono.CSharp.Evaluator.Evaluate
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.2.x
          Platform: Macintosh
        OS/Version: Mac OS X 10.4
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: CORLIB
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          Found By: ---


User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US;
rv:1.9.0.6) Gecko/2009011912 Firefox/3.0.6

I took the example straight from the web page. Compiles fine, but throws an
exception when run.

/*
gmcs -r:Mono.CSharp x-mono-csharp.cs
http://www.go-mono.com/docs/index.aspx?link=M%3aMono.CSharp.Evaluator.Evaluate(string)
*/
using System;
using Mono.CSharp;
class P {    
    static void Main() {
        Evaluator.Run("using System;");
        var sum = (int)Evaluator.Evaluate("1+2");
        Console.WriteLine(sum);
    }
}


Reproducible: Always

Steps to Reproduce:
1. Compile the above program
2. Run it
3. Observe the exception
Actual Results:  
Unhandled Exception: System.ArgumentException: Syntax error on input: partial
input
  at Mono.CSharp.Evaluator.Evaluate (System.String input) [0x00000] 
  at P.Main () [0x00000] 


Expected Results:  
prints 3


Also, Bugzilla needs a Component under "Mono: Class Libraries" for Mono.CSharp
as well as "Other".

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to