[nem-bug] [Nemerle 0000644]: Wrong behavior during base ctor call
feedback at nemerle.org
feedback at nemerle.org
Sun Apr 2 21:53:26 CEST 2006
The following issue has been SUBMITTED.
======================================================================
<http://nemerle.org/bugs/view.php?id=644>
======================================================================
Reported By: VladD2
Assigned To:
======================================================================
Project: Nemerle
Issue ID: 644
Category: Compiler
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 04-02-2006 21:53 CEST
Last Modified: 04-02-2006 21:53 CEST
======================================================================
Summary: Wrong behavior during base ctor call
Description:
This code:
using System.Console;
class A
{
public this() { WriteLine("A()"); }
}
class B : A
{
public this()
{
WriteLine("B()");
base();
}
}
def b = B();
print:
A()
B()
A()
i.e. occur unnecessary ctor call.
In the more complex case:
class A
{
public this(_ : int) { WriteLine("A()"); }
}
class B : A
{
public this(_ : int)
{
WriteLine("B()");
base(2);
}
}
def b = B(1);
ncc generate error:
test-016.n:12:3:15:4: error: wrong number of parameters in call, needed 1,
got 0
test-016.n:12:3:15:4: error: typing error in call
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
04-02-06 21:53 VladD2 New Issue
======================================================================
More information about the bugs
mailing list