D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7672 - Remove top const doesn't work for inout array type.
Summary: Remove top const doesn't work for inout array type.
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords: pull, rejects-valid
Depends on:
Blocks:
 
Reported: 2012-03-08 08:23 UTC by Kenji Hara
Modified: 2012-03-11 15:17 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Kenji Hara 2012-03-08 08:23:41 UTC
T foo(T)(T a){ return a; }

void test(inout(int[]) a = null)
{
    static assert(is( typeof(    a ) == inout(int[]) ));  // OK
    static assert(is( typeof(foo(a)) == inout(int)[] ));  // NG
    // Error: static assert  (is(typeof(__error) == inout(int)[])) is false
}