[Issue 18520] Different delegates can be aliased to the same name multiple times
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Feb 25 03:58:52 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18520
--- Comment #1 from monkeyworks12 at hotmail.com ---
The code seemingly functions correctly when I change it as follows:
int f1(int n) { return 0; }
char f2(char c) { return 'a'; }
bool f3(bool b) { return false; }
alias f = f1;
alias f = f2;
alias f = f3;
void main()
{
import std.stdio;
writeln(f(int.init)); //Prints 0
writeln(f(char.init)); //Prints 'a'
writeln(f(bool.init)); //Prints false
}
--
More information about the Digitalmars-d-bugs
mailing list