[nem-bug] [Nemerle 0000759]: multiple type conversion operators
feedback at nemerle.org
feedback at nemerle.org
Thu Sep 21 00:36:13 CEST 2006
The following issue has been SUBMITTED.
======================================================================
<http://nemerle.org/bugs/view.php?id=759>
======================================================================
Reported By: aleksey
Assigned To:
======================================================================
Project: Nemerle
Issue ID: 759
Category: Compiler
Reproducibility: always
Severity: feature
Priority: normal
Status: new
======================================================================
Date Submitted: 09-21-2006 00:36 CEST
Last Modified: 09-21-2006 00:36 CEST
======================================================================
Summary: multiple type conversion operators
Description:
C# allows multiple implicit or explicit cast operators to be defined.
ncc however doesn't treat cast operators as a special case and reports
with "attempted return type overload" error, though it works fine with
several conversions defined in externally referenced types.
I am not sure whether this is by design or something else. It was easy to
tweak compiler a little and add this feature. I've included a patch,
though I am not sure it is the most elegant and correct solution(at least
it seems to work). Patch also enables return type overloading, by
replacing error message with warning, so you probably would not like to
apply it as is. Btw, am I right that prohibiting return type overloads was
a design decicion, not a limitation(as it seems to work pretty fine)?
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
09-21-06 00:36 aleksey New Issue
09-21-06 00:36 aleksey File Added: multiple_cast_operators.patch
======================================================================
More information about the bugs
mailing list