Bug 926 – Revival of implicit conversion from Derived[] to Base[] not noted in changelog

Status
RESOLVED
Resolution
WONTFIX
Severity
normal
Priority
P2
Component
dlang.org
Product
D
Version
D1 (retired)
Platform
All
OS
All
Creation time
2007-02-03T11:14:00Z
Last change time
2015-12-16T02:18:57Z
Assigned to
smjg
Creator
casantander1

Comments

Comment #0 by casantander1 — 2007-02-03T11:14:46Z
In http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=47590, Kan noted that this was again allowed: class A {} class B : A {} void main() { B [] b; A [] a = b; } I don't know if the docs mention it, but it seems to have been re-allowed out of the blue.
Comment #1 by thomas-dloop — 2007-04-05T11:33:19Z
http://www.digitalmars.com/d/arrays.html > > A dynamic array T[] can be implicitly converted to one of the following: > > * U[] > * void[] > > Where U is a base class of T. >
Comment #2 by smjg — 2009-02-24T09:30:56Z
So the bug is that either: (a) It was disallowed in 0.73 according to the changelog, but the spec itself not updated. The 'bug' that it didn't behave according to spec was subsequently fixed, but Walter completely forgot about the time when the anomaly was introduced. (b) It was disallowed in 0.73, the spec updated, and then the reversion both in the spec and in the compiler was inadvertently left out of the changelog.
Comment #3 by smjg — 2011-01-08T15:26:39Z
The version, priority and severity changes just made make no sense at all.
Comment #4 by bugzilla — 2012-01-29T02:10:38Z
This is D1 only. D2 does not allow it. The D1 spec allows it, and changing it would be an enhancement.
Comment #5 by smjg — 2012-01-29T07:15:47Z
The D1 spec allows what? The spec and the changelog to contradict each other? In which DMD version was this misfeature revived, anyway?
Comment #6 by bugzilla — 2012-01-29T10:29:25Z
(In reply to comment #5) > The D1 spec allows what? It allows implict conversion of an array of derived classes to an array of base classes. Thomas quoted the relevant verbage. > The spec and the changelog to contradict each other? What matters is what the spec says and what the compiler does now. If someone wants to go through the compiler/spec diffs from years ago to see when things changed, that's fine and I'll fold in changelog changes if they present them, but I've got a lot of current issues to address, and historical spelunking is off the radar. > In which DMD version was this misfeature revived, anyway? I don't know. I agree it is a misfeature, but I am loathe to break existing D1 code at this point, so I believe it should stay as it is.
Comment #7 by smjg — 2012-01-30T08:55:26Z
(In reply to comment #6) > What matters is what the spec says and what the compiler does now. If someone > wants to go through the compiler/spec diffs from years ago to see when things > changed, that's fine and I'll fold in changelog changes if they present them, The standard meaning of WONTFIX is "this issue is to stay as it is" not "I personally can't be bothered/don't have time to deal with it". The way to indicate the latter is to leave it open and reassign it to nobody - this shows that it's free for anybody to take the issue and work on it. Here's an idea: I'll have a look at it myself over the next few days.
Comment #8 by bugzilla — 2012-01-30T11:27:08Z
(In reply to comment #7) > Here's an idea: I'll have a look at it myself over the next few days. I'll be happy to merge in any changes you suggest.
Comment #9 by jack — 2015-12-16T02:18:57Z
Remarking this as won't fix because it's a luxury D1 issue that no one really has time for, and frankly, who honestly cares? No one uses D1 anymore and the fact that a changelog entry is missing for something that came out eight years ago now is not going to be fixed.