Add regression test for issue 16663

This commit is contained in:
Dicebot 2016-11-10 19:48:08 +02:00
parent 8f8979ebe1
commit 2f27e58b0e

View file

@ -8898,6 +8898,22 @@ S toLower(S)(S s) @trusted pure
{ return toLower!wstring(s); }
dstring toLower(dstring s)
{ return toLower!dstring(s); }
unittest
{
// https://issues.dlang.org/show_bug.cgi?id=16663
static struct String
{
string data;
alias data this;
}
void foo()
{
auto u = toLower(String(""));
}
}
}
@ -9064,6 +9080,22 @@ S toUpper(S)(S s) @trusted pure
{ return toUpper!wstring(s); }
dstring toUpper(dstring s)
{ return toUpper!dstring(s); }
unittest
{
// https://issues.dlang.org/show_bug.cgi?id=16663
static struct String
{
string data;
alias data this;
}
void foo()
{
auto u = toUpper(String(""));
}
}
}
@safe unittest