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


           Summary: using 'super' instead of 'base' to call base
                    constructor crashes compiler
    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: ---


User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.6)
Gecko/2009020911 Ubuntu/8.04 (hardy) Firefox/3.0.6

When you use super instead of base the compiler crashes (both mcs and gmcs).
Semi-minimal example:

public class Foo {
    public Foo(int a){}
}

public class ChildFoo:Foo {
    public ChildFoo(int a):super(a){}
}

Minimal example:

class Bar {Bar(int a):super(a){}}

Reproducible: Always

Steps to Reproduce:
Compile this program:

class Bar {Bar(int a):super(a){}}
Actual Results:  
System.InvalidCastException: Cannot cast from source type to destination type.
  at Mono.CSharp.CSharpParser.yyparse (yyInput yyLex) [0x00000] 
  at Mono.CSharp.CSharpParser.parse () [0x00000] 


Expected Results:  
Give a sensible error

-- 
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