Bug 2721 – func(ref X) does not match parameter types (X)

Status
RESOLVED
Resolution
DUPLICATE
Severity
critical
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2009-03-09T16:53:00Z
Last change time
2015-06-09T05:14:47Z
Assigned to
bugzilla
Creator
kk_tnr

Comments

Comment #0 by kk_tnr — 2009-03-09T16:53:34Z
DMD2.026 on Windows See this code. struct S{ } void main(){ S s; func(s); // work correctly func(retS()); //// should not be error. } void func(ref S s){ } S retS(){ S s; return(s); } I got this message. function example.func(ref S s) does not match parameter types (S) This is definitely a bug.
Comment #1 by gide — 2009-03-09T17:49:14Z
*** This bug has been marked as a duplicate of 2719 ***