[Issue 15819] New: Error: cannot resolve type for temp.array(Range)(Range r) if (isIterable!Range && !isNarrowString!Range && !isInfinite!Range) //static assert(is(typeof(temp.array)));

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Mar 21 22:25:31 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=15819

          Issue ID: 15819
           Summary: Error: cannot resolve type for temp.array(Range)(Range
                    r) if (isIterable!Range && !isNarrowString!Range &&
                    !isInfinite!Range)   //static
                    assert(is(typeof(temp.array)));
           Product: D
           Version: D2
          Hardware: x86
                OS: Mac OS X
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: timothee.cour2 at gmail.com

not sure whether it's a dmd or phobos error (or if i missed something) but:

void fun(){
  // ...
  alias Range = typeof(temp);
  static assert(isInputRange!Range);
  static assert(isIterable!Range && !isNarrowString!Range &&
!isInfinite!Range);

  static assert(is(typeof(temp.array))); // CT error
}

error:

Error: cannot resolve type for temp.array(Range)(Range r) if (isIterable!Range
&& !isNarrowString!Range && !isInfinite!Range)
  //static assert(is(typeof(temp.array)));


single file code here:
https://github.com/timotheecour/dtools/blob/master/dtools/util/emit.d

using: DMD64 D Compiler v2.070 (same with git head)

--


More information about the Digitalmars-d-bugs mailing list