Bug 16135 – missing std.format import in std.algorithm.comparison
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2016-06-07T12:26:00Z
Last change time
2017-01-16T23:26:22Z
Keywords
trivial
Assigned to
nobody
Creator
schuetzm
Comments
Comment #0 by schuetzm — 2016-06-07T12:26:14Z
import std.algorithm : castSwitch;
interface I { }
class B : I { }
void main() {
Object[] arr = [new B(), null];
castSwitch!(
(I i) => "derived from I",
(B b) => "class B",
);
}
Results in:
/home/marc/d/phobos/std/algorithm/comparison.d(275): Error: no property 'format' for type 'string'
Apparently, an import is missing there.
Discovered by user on the forum:
https://forum.dlang.org/post/[email protected]