https://bugzilla.novell.com/show_bug.cgi?id=674963
https://bugzilla.novell.com/show_bug.cgi?id=674963#c0 Summary: CSharp REPL is throws exception when declaring class with property Classification: Mono Product: Mono: Compilers Version: SVN Platform: All OS/Version: All Status: NEW Severity: Normal Priority: P5 - None Component: C# AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.114 Safari/534.16 This bugs regards newest csharp feature described here: http://tirania.org/blog/archive/2011/Feb-24.html In short it's not possible to declare with property. Here is my repl log: csharp> public class C { public int Speed{get;set;}}; csharp> C c = new C(); Mono.CSharp.InternalErrorException: builder already exists at Mono.CSharp.Parameter.ApplyAttributes (System.Reflection.Emit.MethodBuilder mb, System.Reflection.Emit.ConstructorBuilder cb, Int32 index, Mono.CSharp.PredefinedAttributes pa) [0x00000] in <filename unknown>:0 at Mono.CSharp.ParametersCompiled.ApplyAttributes (IMemberContext mc, System.Reflection.MethodBase builder) [0x00000] in <filename unknown>:0 at Mono.CSharp.MethodData.Emit (Mono.CSharp.DeclSpace parent) [0x00000] in <filename unknown>:0 at Mono.CSharp.AbstractPropertyEventMethod.Emit (Mono.CSharp.DeclSpace parent) [0x00000] in <filename unknown>:0 at Mono.CSharp.PropertyBase.Emit () [0x00000] in <filename unknown>:0 at Mono.CSharp.Property.Emit () [0x00000] in <filename unknown>:0 at Mono.CSharp.TypeContainer.EmitType () [0x00000] in <filename unknown>:0 at Mono.CSharp.ModuleContainer.Emit () [0x00000] in <filename unknown>:0 at Mono.CSharp.Evaluator.CompileBlock (Mono.CSharp.Class host, Mono.CSharp.Undo undo, Mono.CSharp.Report Report) [0x00000] in <filename unknown>:0 at Mono.CSharp.Evaluator.Compile (System.String input, Mono.CSharp.CompiledMethod& compiled) [0x00000] in <filename unknown>:0 at Mono.CSharp.Evaluator.Evaluate (System.String input, System.Object& result, System.Boolean& result_set) [0x00000] in <filename unknown>:0 at Mono.CSharpShell.Evaluate (System.String input) [0x00000] in <filename unknown>:0 Reproducible: Always Steps to Reproduce: 1.open csharp repl 2.declare class as: public class C { public int Speed{get;set;}}; 3.declare C instance: C c = new C(); Actual Results: exception is thrown: Mono.CSharp.InternalErrorException: builder already exists at Mono.CSharp.Parameter.ApplyAttributes (System.Reflection.Emit.MethodBuilder mb, System.Reflection.Emit.ConstructorBuilder cb, Int32 index, Mono.CSharp.PredefinedAttributes pa) [0x00000] in <filename unknown>:0 at Mono.CSharp.ParametersCompiled.ApplyAttributes (IMemberContext mc, System.Reflection.MethodBase builder) [0x00000] in <filename unknown>:0 at Mono.CSharp.MethodData.Emit (Mono.CSharp.DeclSpace parent) [0x00000] in <filename unknown>:0 at Mono.CSharp.AbstractPropertyEventMethod.Emit (Mono.CSharp.DeclSpace parent) [0x00000] in <filename unknown>:0 at Mono.CSharp.PropertyBase.Emit () [0x00000] in <filename unknown>:0 at Mono.CSharp.Property.Emit () [0x00000] in <filename unknown>:0 at Mono.CSharp.TypeContainer.EmitType () [0x00000] in <filename unknown>:0 at Mono.CSharp.ModuleContainer.Emit () [0x00000] in <filename unknown>:0 at Mono.CSharp.Evaluator.CompileBlock (Mono.CSharp.Class host, Mono.CSharp.Undo undo, Mono.CSharp.Report Report) [0x00000] in <filename unknown>:0 at Mono.CSharp.Evaluator.Compile (System.String input, Mono.CSharp.CompiledMethod& compiled) [0x00000] in <filename unknown>:0 at Mono.CSharp.Evaluator.Evaluate (System.String input, System.Object& result, System.Boolean& result_set) [0x00000] in <filename unknown>:0 at Mono.CSharpShell.Evaluate (System.String input) [0x00000] in <filename unknown>:0 Expected Results: C class declaration i've tried: public class D { int x; public int X { get { return x; } set { x = value;} } }; public class C { public int Speed{get;set;}}; both results in the same error. Additional thing is that it's not possible to leave csharp repl with "exit" command after this error (should i fill another bug) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
