[Issue 16478] New: Confusing internal error message with std.variant.visit
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Sep 8 16:45:53 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=16478
Issue ID: 16478
Summary: Confusing internal error message with
std.variant.visit
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: john.loughran.colvin at gmail.com
import std.variant;
import std.conv;
void main()
{
Algebraic!(bool[]) a = [true];
auto b = a.visit!(to!string);
}
std/conv.d(296): Error: template instance isRawStaticArray!() does not match
template declaration isRawStaticArray(T, A...)
std/variant.d(2214): Error: static assert "to(A...)(A args) if
(!isRawStaticArray!A) is not a function or delegate"
std/variant.d(1991): instantiated from here: visitImpl!(true,
VariantN!(16LU, bool[]), to)
visitError.d(6): instantiated from here: visit!(VariantN!(16LU, bool[]))
seems like that first error shouldn't be happening.
--
More information about the Digitalmars-d-bugs
mailing list