www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20876] New: DMD gives out not so helpful compile error

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

          Issue ID: 20876
           Summary: DMD gives out not so helpful compile error
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: puneet coverify.org

Created attachment 1793
  --> https://issues.dlang.org/attachment.cgi?id=1793&action=edit
test.d

Compiles without error with dmd-2.085. With the dmd nightly build I get:

$ dmd -c test.d
/tmp/dmd2/linux/bin64/../../src/phobos/std/container/array.d(208): Error: none
of the overloads of opSliceAssign are callable using argument types (Foo,
ulong, ulong), candidates are:
/tmp/dmd2/linux/bin64/../../src/phobos/std/container/array.d(724):       
std.container.array.Array!(Foo).Array.opSliceAssign(Foo value)
/tmp/dmd2/linux/bin64/../../src/phobos/std/container/array.d(731):       
std.container.array.Array!(Foo).Array.opSliceAssign(Foo value, ulong i, ulong
j)
/tmp/dmd2/linux/bin64/../../src/phobos/std/container/array.d(215): Error: none
of the overloads of opSliceAssign are callable using argument types (Foo,
ulong, ulong), candidates are:
/tmp/dmd2/linux/bin64/../../src/phobos/std/container/array.d(724):       
std.container.array.Array!(Foo).Array.opSliceAssign(Foo value)
/tmp/dmd2/linux/bin64/../../src/phobos/std/container/array.d(731):       
std.container.array.Array!(Foo).Array.opSliceAssign(Foo value, ulong i, ulong
j)
/tmp/dmd2/linux/bin64/../../src/phobos/std/container/array.d(529): Error:
template instance std.container.array.RangeT!(Array!(Foo)) error instantiating
test.d(3):        instantiated from here: Array!(Foo)

--
May 28