[Issue 18974] ICE with mixin templates, inheritance and overloading

2020-03-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18974

Basile-z  changed:

   What|Removed |Added

 CC|b2.t...@gmx.com |

--


[Issue 18974] ICE with mixin templates, inheritance and overloading

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

Basile-z  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||b2.t...@gmx.com
 Resolution|--- |WORKSFORME

--


[Issue 18974] ICE with mixin templates, inheritance and overloading

2018-06-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18974

Simen Kjaeraas  changed:

   What|Removed |Added

   Keywords||ice
 CC||simen.kja...@gmail.com

--- Comment #1 from Simen Kjaeraas  ---
Further simplified:

template Mixin() {
void fun(const int) { }
}

class Foo {
mixin Mixin!();
mixin Mixin!();
}

class Bar : Foo {
override void fun(int) { } // Line 11
}

This gives a slightly different stack trace (top calls are still the same).
This difference is caused by templatization of Foo, and can be disregarded.

Changing the type on line 14 from A to const(A) removes the crash. Rewriting to
using a single invocation of Mixin with two function definitions inside gives
this message:

Error: function void foo.Bar.fun(A) does not override any function, did you
mean to override void foo.Foo!int.Foo.Mixin!(A, B).fun(const(A))?

--