[Issue 18606] [REG2.072] "cannot append type const(T) to type T[]" in .dup

2019-01-11 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18606

John Colvin  changed:

   What|Removed |Added

 CC||john.loughran.colvin@gmail.
   ||com

--- Comment #3 from John Colvin  ---
Related:

struct S
{
string get(string key)
{
return key;
}
alias get this;
}

void main()
{
S[] a;
auto b = a.dup;
}

/dlang/dmd/linux/bin64/../../src/druntime/import/object.d(4473): Error: mutable
method onlineapp.S.get is not callable using a const object
/dlang/dmd/linux/bin64/../../src/druntime/import/object.d(4473):   
Consider adding const or inout to onlineapp.S.get
/dlang/dmd/linux/bin64/../../src/druntime/import/object.d(4460): Error:
template instance `object._dup!(const(S), S)` error instantiating
/dlang/dmd/linux/bin64/../../src/druntime/import/object.d(4424):   
instantiated from here: _trustedDup!(const(S), S)
onlineapp.d(13):instantiated from here: dup!(S)


and


struct S
{
string get(string key) const
{
return key;
}
alias get this;
}

void main()
{
S[] a;
auto b = a.dup;
}

/dlang/dmd/linux/bin64/../../src/druntime/import/object.d(4473): Error:
function onlineapp.S.get(string key) const is not callable using argument types
() const
/dlang/dmd/linux/bin64/../../src/druntime/import/object.d(4473):missing
argument for parameter #1: string key
/dlang/dmd/linux/bin64/../../src/druntime/import/object.d(4460): Error:
template instance `object._dup!(const(S), S)` error instantiating
/dlang/dmd/linux/bin64/../../src/druntime/import/object.d(4424):   
instantiated from here: _trustedDup!(const(S), S)
onlineapp.d(13):instantiated from here: dup!(S)

--


[Issue 18606] [REG2.072] "cannot append type const(T) to type T[]" in .dup

2018-12-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18606

Walter Bright  changed:

   What|Removed |Added

   See Also||https://issues.dlang.org/sh
   ||ow_bug.cgi?id=16607

--


[Issue 18606] [REG2.072] "cannot append type const(T) to type T[]" in .dup

2018-05-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18606

--- Comment #2 from Vladimir Panteleev  ---
The commits are big too, but if it helped, I can bisect it down to the commit.

--


[Issue 18606] [REG2.072] "cannot append type const(T) to type T[]" in .dup

2018-05-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18606

--- Comment #1 from Walter Bright  ---
(In reply to Vladimir Panteleev from comment #0)
> Introduced in https://github.com/dlang/dmd/pull/5500

This is why I don't like 700 line PRs spread across 18 files :-(

--


[Issue 18606] [REG2.072] "cannot append type const(T) to type T[]" in .dup

2018-03-25 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18606

Walter Bright  changed:

   What|Removed |Added

 CC||bugzi...@digitalmars.com
   Hardware|x86_64  |All
 OS|Linux   |All

--