D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6870 - type qualifiers behave inconsistently in combination with typeof
Summary: type qualifiers behave inconsistently in combination with typeof
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other Linux
: P2 normal
Assignee: No Owner
URL:
Keywords: patch, rejects-valid
Depends on:
Blocks:
 
Reported: 2011-11-01 03:45 UTC by timon.gehr
Modified: 2011-11-14 16:06 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 timon.gehr 2011-11-01 03:45:28 UTC
tested with DMD 2.056

void main(){
    shared(int) x;
    static assert(is(typeof(x) == shared(int))); // pass
    const(typeof(x)) y;
    const(shared(int)) z;
    static assert(is(typeof(y) == typeof(z))); // fail!
}

The static assertion should pass.