[Issue 8397] New: parameter types are not checked when assigning a function literal
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jul 17 17:51:10 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8397
Summary: parameter types are not checked when assigning a
function literal
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: accepts-invalid
Severity: regression
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: mailme+d at nilsb.dyndns.org
--- Comment #0 from Nils <mailme+d at nilsb.dyndns.org> 2012-07-17 17:51:08 PDT ---
This compiles since 2.059:
---
void function(int) f;
void main() {
f = function(string x) {};
}
---
2.058 correctly complains:
Error: cannot implicitly convert expression (__funcliteral1) of type void
function(string x) pure nothrow @safe to void function(int)
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list