[Issue 12720] New: Non-int integral template parameters not mangled correctly
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu May 8 22:30:52 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=12720
Issue ID: 12720
Summary: Non-int integral template parameters not mangled
correctly
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: kai at redstar.de
This is a followup of fixed issue 3467. The name mangling is still wrong.
struct foo( ulong n ) {
foo!( n ) bar( ) {
typeof( return ) result;
return result;
}
}
void main( ) {
foo!( 4 ) baz;
baz = baz.bar;// FAIL
}
The bar function of
foo!( 4 ) baz
is mangled as
_D7bug346712__T3fooVii4Z3foo3barMFNaNbNiNfZS7bug346712__T3fooVii4Z3foo
but bar function of
foo!( 4L ) baz
is mangled as
_D7bug346712__T3fooVli4Z3foo3barMFNaNbNiNfZS7bug346712__T3fooVli4Z3foo
In both cases, I would expect
_D7bug346712__T3fooVmi4Z3foo3barMFNaNbNiNfZS7bug346712__T3fooVmi4Z3foo
because the type parameter is ulong.
There is a partial fix in the source (template.c, around line 7249) but this
does not compile.
--
More information about the Digitalmars-d-bugs
mailing list