D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7214 - Change of template specialization resolution
Summary: Change of template specialization resolution
Status: RESOLVED INVALID
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other All
: P2 minor
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-03 20:59 UTC by Martin Nowak
Modified: 2012-01-04 18:28 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Martin Nowak 2012-01-03 20:59:36 UTC
template isStaticArray(T : U[N], U, size_t N)
{
    enum bool isStaticArray = true;
}

template isStaticArray(T)
{
    enum bool isStaticArray = false;
}

struct Matrix
{
    float[3][3] _data;
    alias _data this;
}

static assert(!isStaticArray!Matrix); // isStaticArray!Matrix is true now

---------

This piece of code changed it's semantics with the recent
dmd changes. Just wanted to make sure that this is deliberate.
Comment 1 Kenji Hara 2012-01-03 21:11:32 UTC
The report is bug 7124.
Comment 2 Martin Nowak 2012-01-04 18:28:17 UTC
This is likely OK.
I just saw that the T of T : U[N] will still bind to Matrix,
so the full type information is preserved.