www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16478] New: Confusing internal error message with


          Issue ID: 16478
           Summary: Confusing internal error message with
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: john.loughran.colvin 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.

Sep 08 2016