Bug 11773 – `inout` `function`/`delegate` should be implicitly convertible to mutable/`const`/`immutable`

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-12-19T06:46:00Z
Last change time
2013-12-19T10:26:21Z
Keywords
rejects-valid
Assigned to
nobody
Creator
verylonglogin.reg

Comments

Comment #0 by verylonglogin.reg — 2013-12-19T06:46:10Z
This code should compile: --- void main() { inout(int*) function(inout int*) funcInout; int* function(int*) funcM = funcInout; // Error: cannot implicitly convert const(int*) function(const int*) funcC = funcInout; // same error immutable(int*) function(immutable int*) funcI = funcInout; // same error inout(int*) delegate(inout int*) delInout; int* delegate(int*) delM = delInout; // same error const(int*) delegate(const int*) delC = delInout; // same error immutable(int*) delegate(immutable int*) delI = delInout; // same error } ---
Comment #1 by andrej.mitrovich — 2013-12-19T08:08:22Z
This seems similar to Issue 7725, which is another dupe of Issue 3075.
Comment #2 by verylonglogin.reg — 2013-12-19T10:22:52Z
(In reply to comment #1) > This seems similar to Issue 7725, which is another dupe of Issue 3075. Yes, but this one is about `inout`. Probably may be closed and original test added to Issue 3075.
Comment #3 by verylonglogin.reg — 2013-12-19T10:26:21Z
*** This issue has been marked as a duplicate of issue 3075 ***