[nem-bug] [Nemerle 0000993]: Record macro: improve work with base
ctors
feedback at nemerle.org
feedback at nemerle.org
Sun May 13 13:47:23 CEST 2007
A NOTE has been added to this issue.
======================================================================
<http://nemerle.org/bugs/view.php?id=993>
======================================================================
Reported By: divan
Assigned To:
======================================================================
Project: Nemerle
Issue ID: 993
Category: The Macro Library
Reproducibility: always
Severity: feature
Priority: normal
Status: new
======================================================================
Date Submitted: 04-23-2007 19:53 CEST
Last Modified: 05-13-2007 13:47 CEST
======================================================================
Summary: Record macro: improve work with base ctors
Description:
1) Record can produce bad ctor
class Base {
public this (x : int = 3) {}
}
[Record] // E: duplicate parameter name: x
class Inh : Base {
x : int
};
With different names we'll get not too good ctor too, it'll require 2
params.
2) Probably there must be an option to use only default base ctor
2.1) With that option default base ctor params should work
3) And/or only one/some base ctor (for example by specifying syntax of
call, like "base (int)" or "base (2)")
4) Possibly params that go to base ctor should be renamed, so we'll have
something like "this (base_x, x)"
======================================================================
----------------------------------------------------------------------
nazgul - 04-23-07 21:57
----------------------------------------------------------------------
I think in this case we have two problems - first that parameters in
generated ctor should be alpha-renamed to not conflict with each other,
second with base ctor having default param we should generate two
overloads of current class' ctors (the other option would be to append new
parameters to the beginning and make the last param with default value, but
this would in inconsitent with current schema)
----------------------------------------------------------------------
nazgul - 05-13-07 13:47
----------------------------------------------------------------------
I fixed the problem with accessibility (prevent copying private ctors) in
7676
Issue History
Date Modified Username Field Change
======================================================================
04-23-07 19:53 divan New Issue
04-23-07 21:57 nazgul Note Added: 0001848
05-13-07 13:47 nazgul Note Added: 0001887
======================================================================
More information about the bugs
mailing list