Bug 17123 – [REG 2.073] Issues with return @safe inference
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2017-01-26T13:41:00Z
Last change time
2017-02-24T20:34:28Z
Keywords
safe
Assigned to
nobody
Creator
public
Comments
Comment #0 by public — 2017-01-26T13:41:22Z
Several compilation issues in https://github.com/jacob-carlborg/dstep because of attribute inference + return
Most simple example:
---
void main ()
{
import std.socket;
auto f = new TcpSocket;
char[256] buffer;
char[] delegate() read = () {
size_t num = f.receive(buffer);
return buffer[0 .. num];
};
}
---
sample.d(8): Error: cannot implicitly convert expression (__lambda1) of type char[] delegate() return @safe to char[] delegate()
sample.d(8): Error: cannot implicitly convert expression (__lambda1) of type char[] delegate() return @safe to char[] delegate()