Bug 1576 – Crash on const ref parameters

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2007-10-13T03:46:00Z
Last change time
2015-06-09T01:14:18Z
Assigned to
bugzilla
Creator
jemandy

Comments

Comment #0 by jemandy — 2007-10-13T03:46:51Z
A formal function parameter specified as const ref (or as ref const) causes DMD 2.005 to crash with a "tell Microsoft about the problem" dialog box.
Comment #1 by braddr — 2007-10-13T13:08:35Z
Please add a reproducable testcase.
Comment #2 by spam — 2007-10-13T13:33:33Z
i came across this one a few times too! testcase: struct Foo { void bar(ref const int _a) { } } void main() { Foo a; int b=0; a.bar(b); }
Comment #3 by spam — 2007-10-13T13:34:46Z
oh sorry there is even a smaller one: void bar(ref const int _a) { } void main() { int b=0; bar(b); }
Comment #4 by wbaxter — 2007-10-13T15:00:57Z
*** This bug has been marked as a duplicate of 1319 ***
Comment #5 by wbaxter — 2007-10-13T15:06:08Z
Please at least *try* to do a search for a pre-existing bug before you report a new one.
Comment #6 by jemandy — 2007-10-13T15:29:33Z
(In reply to comment #5) > Please at least *try* to do a search for a pre-existing bug before you report a > new one. > Sorry. I actually did try. My search for "const ref" turned up 200 items of which 199 were irrelevant. The other one, I'm afaid, I missed. My apologies.
Comment #7 by jemandy — 2007-10-15T23:40:17Z
== Quote from Bill Baxter ([email protected])'s article > Huh. Weird. When I did the search I got 3 hits. Where did you enter > the search terms? I just put them in here: > http://d.puremagic.com/issues/ > Maybe you did a search including all closed and resolved items? > --bb Argh, yes, I searched for all items from http://d.puremagic.com/issues/query.cgi. Now I feel *really* silly. I guess there is no need to include closed issues. Again, I apologize.