[Issue 21481] New: presence of function template prevents diagnostic
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Dec 14 00:26:10 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=21481
Issue ID: 21481
Summary: presence of function template prevents diagnostic
Product: D
Version: D2
Hardware: x86_64
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: kdevel at vogtner.de
from http://forum.dlang.org/thread/lhnvvkylevyuwotygjol@forum.dlang.org
~~~A.d
module A;
import std.stdio;
void bar (int s) { __PRETTY_FUNCTION__.writeln; }
~~~
~~~foo.d
import std.stdio;
import A;
alias bar = A.bar;
version (X) {
void bar (T) (T t) { __PRETTY_FUNCTION__.writeln; }
}
void bar (int s) { __PRETTY_FUNCTION__.writeln; }
void main ()
{
bar (1);
}
~~~
$ dmd -i foo
foo.d(13): Error: foo.bar called with argument types (int) matches both:
A.d(4): A.bar(int s)
and:
foo.d(9): foo.bar(int s)
$ dmd -version=X -i foo
$ ./foo
void A.bar(int s)
--
More information about the Digitalmars-d-bugs
mailing list