ttt.d
import std.string;
void main() {
lastIndexOf("aa","bb");
}
rdmd ttt.d
compiles successfully without any errors or warnings
rdmd -dw ttt.d
compiles successfully without any errors or warnings
rdmd -de ttt.d
/usr/include/dmd/phobos/std/string.d(1239): Error: template
std.algorithm.searching.endsWith cannot deduce function from
argument types !((a, b) => std.uni.toLower(a) ==
std.uni.toLower(b))(const(char)[], const(char)[]), candidates
are:
/usr/include/dmd/phobos/std/algorithm/searching.d(981):
std.algorithm.searching.endsWith(alias pred = "a == b", Range,
Needles...)(Range doesThisEnd, Needles withOneOfThese) if
(isBidirectionalRange!Range && Needles.length > 1 &&
is(typeof(.endsWith!pred(doesThisEnd, withOneOfThese[0])) :
bool) && is(typeof(.endsWith!pred(doesThisEnd,
withOneOfThese[1..__dollar])) : uint))
/usr/include/dmd/phobos/std/algorithm/searching.d(1048):
std.algorithm.searching.endsWith(alias pred = "a == b", R1,
R2)(R1 doesThisEnd, R2 withThis) if (isBidirectionalRange!R1 &&
isBidirectionalRange!R2 &&
is(typeof(binaryFun!pred(doesThisEnd.back, withThis.back)) :
bool))
/usr/include/dmd/phobos/std/algorithm/searching.d(1076):
std.algorithm.searching.endsWith(alias pred = "a == b", R, E)(R
doesThisEnd, E withThis) if (isBidirectionalRange!R &&
is(typeof(binaryFun!pred(doesThisEnd.back, withThis)) : bool))
/usr/include/dmd/phobos/std/algorithm/searching.d(1086):
std.algorithm.searching.endsWith(alias pred, R)(R doesThisEnd)
if (isInputRange!R && ifTestable!(typeof(doesThisEnd.front),
unaryFun!pred))
ttt.d(4): Error: template instance
std.string.lastIndexOf!(char, char) error instantiating