Thread overview | ||||||
---|---|---|---|---|---|---|
|
May 24, 2014 [Issue 10819] Implicit conversion error assigning one SortedRange to another when a function literal has been used | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=10819 Stewart Gordon <smjg@iname.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rejects-valid CC| |smjg@iname.com Summary|Invalid comparison for |Implicit conversion error |equality of lambda |assigning one SortedRange |functions |to another when a function | |literal has been used --- Comment #10 from Stewart Gordon <smjg@iname.com> --- You completely forgot to post the compiler output. Here's what I get (DMD 2.065 Win32): bz10189.d(8): Error: cannot implicitly convert expression (c) of type SortedRange!(int[], (a, b) => a > b) to SortedRange!(int[], (a, b) => a > b) But the two types are the same. The same occurs when a D1-style function literal is used ----- bz10189a.d ----- void main() { import std.range; SortedRange!(int[], "a > b") a; SortedRange!(int[], "a > b") b; b = a; SortedRange!(int[], function bool(a, b) { return a > b; }) c; SortedRange!(int[], function bool(a, b) { return a > b; }) d; d = c; } ---------- C:\Users\Stewart\Documents\Programming\D\Tests\bugs>dmd bz10189a.d bz10189a.d(8): Error: cannot implicitly convert expression (c) of type SortedRange!(int[], function bool(a, b) { return a > b; } ) to SortedRange!(int[], function bool(a, b) { return a > b; } ) ---------- -- |
December 17, 2022 [Issue 10819] Implicit conversion error assigning one SortedRange to another when a function literal has been used | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=10819 Iain Buclaw <ibuclaw@gdcproject.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P2 |P3 -- |
January 04, 2023 [Issue 10819] Implicit conversion error assigning one SortedRange to another when a function literal has been used | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=10819 RazvanN <razvan.nitu1305@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |razvan.nitu1305@gmail.com Component|dmd |phobos --- Comment #11 from RazvanN <razvan.nitu1305@gmail.com> --- We now have traits(isSame) that can perform a primitive form of lambda function comparison. This can now be implemented in the opAssign of SortedRange so it's not a compiler issue anymore. Changing component to phobos. -- |
December 01 [Issue 10819] Implicit conversion error assigning one SortedRange to another when a function literal has been used | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=10819 --- Comment #12 from dlangBugzillaToGithub <robert.schadek@posteo.de> --- THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/9999 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB -- |
Copyright © 1999-2021 by the D Language Foundation