Bug 12720 – Non-int integral template parameters not mangled correctly
Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-05-09T05:30:00Z
Last change time
2014-05-09T18:31:34Z
Assigned to
nobody
Creator
kai
Comments
Comment #0 by kai — 2014-05-09T05:30:52Z
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.
Comment #1 by k.hara.pg — 2014-05-09T18:31:34Z
This issue is a part of 7469.
*** This issue has been marked as a duplicate of issue 7469 ***