Function overloading between modules
bauss
jj_1337 at live.dk
Fri Feb 23 12:17:38 UTC 2018
On Thursday, 22 February 2018 at 21:12:45 UTC, JN wrote:
> Is this expected behaviour?
>
> bar.d
> ---
> void foo(string s)
> {
> }
>
>
> app.d
> ---
>
> import std.stdio;
> import bar;
>
> void foo(int x)
> {
> }
>
> void main()
> {
> foo("hi");
> };
>
>
> ===
> Error: function app.foo (int x) is not callable using argument
> types (string)
https://dlang.org/articles/hijack.html
More information about the Digitalmars-d-learn
mailing list