[Issue 9215] New: [2.061 beta] isDymanicArray/DynamicArrayTypeOf broken for classes/interfaces with AliasThis
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Dec 26 18:17:55 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=9215
Summary: [2.061 beta] isDymanicArray/DynamicArrayTypeOf broken
for classes/interfaces with AliasThis
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: regression
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: code at klickverbot.at
--- Comment #0 from David Nadlinger <code at klickverbot.at> 2012-12-26 18:17:53 PST ---
Using DMD 2.061 beta 1, this code
---
import std.traits : DynamicArrayTypeOf;
interface Foo {
final int aliasThis() @property { return 0; }
alias aliasThis this;
}
pragma(msg, DynamicArrayTypeOf!(Foo[]));
---
leads to a rather interesting error message (note the missing location
information):
---
Error: function test.Foo.aliasThis () is not callable using argument types ()
inout
test.d(8): Error: template instance std.traits.DynamicArrayTypeOf!(Foo[]) error
instantiating
test.d(8): while evaluating pragma(msg, DynamicArrayTypeOf!(Foo[]))
---
The culprit lies in the implementation of DynamicArrayTypeOf, but I didn't have
a closer look at it yet to figure out whether it is a DMD or a Phobos bug.
This issue causes isDynamicArray to silently return false for Foo[] as defined
above.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list