D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 3485 - [tdpl] Double bug in typedef
Summary: [tdpl] Double bug in typedef
Status: RESOLVED WONTFIX
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other Linux
: P2 normal
Assignee: No Owner
URL:
Keywords: accepts-invalid, rejects-valid
Depends on:
Blocks:
 
Reported: 2009-11-07 08:34 UTC by Andrei Alexandrescu
Modified: 2015-06-09 05:15 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 Andrei Alexandrescu 2009-11-07 08:34:09 UTC
unittest {
    typedef double Mass;
    Mass m1 = 10;           // works, should NOT work
    Mass m2 = 10.0;         // does not work, should NOT work
    auto m3 = Mass(10);     // does not work, SHOULD work
    auto m4 = Mass(10.0);   // does not work, SHOULD work
}
Comment 1 Walter Bright 2009-11-18 10:53:01 UTC
Dropping typedef, so won't fix.