November 03, 2022 [Issue 23455] New: Public import + mixin template + overload definition for a package function fails overload resolution | ||||
|---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=23455 Issue ID: 23455 Summary: Public import + mixin template + overload definition for a package function fails overload resolution Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: msnmancini@hotmail.com Here I show the minimal reproducible bug. app.d: ```d import std.stdio; import bug.test_float; void main() { writeln("Hello ", add(10, 10)); } ``` bug/test_float.d: ```d module bug.test_float; public import bug.test_pkg_int; mixin template GenerateAdd() { float add(float a, float b){return a+b;} } mixin GenerateAdd; ``` bug/test_pkg_int.d: ```d module bug.test_pkg_int; package int add(int a, int b){return a+b;} ``` The error: app.d(6): Error: function bug.test_float.GenerateAdd!().add at bug\test_float.d(6) conflicts with function bug.test_pkg_int.add at bug\test_pkg_int.d(3) -- | ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply