[Issue 19674] New: multiple local template function with same name don't work
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Feb 13 05:56:22 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=19674
Issue ID: 19674
Summary: multiple local template function with same name don't
work
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: alex at sunopti.com
import std.stdio;
void main()
{
{
auto a = new int[0];
void add(T)(T x)
{
a ~= x;
}
add(3);
writefln("%s",a); //should be [3] and is
}
{
auto a = new int[0];
void add(T)(T x)
{
a ~= x;
}
add(3);
writefln("%s",a); //should be [3] but isn't
}
}
--
More information about the Digitalmars-d-bugs
mailing list