[Mono-bugs] [Bug 674963] New: CSharp REPL is throws exception when declaring class with property
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Fri Feb 25 02:36:29 EST 2011
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: msafar at novell.com
ReportedBy: Tomasz.Kubacki at gmail.com
QAContact: mono-bugs at lists.ximian.com
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.
More information about the mono-bugs
mailing list