D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 4229 - cast spec
Summary: cast spec
Status: RESOLVED WORKSFORME
Alias: None
Product: D
Classification: Unclassified
Component: dlang.org (show other issues)
Version: D2
Hardware: Other Linux
: P2 normal
Assignee: No Owner
URL:
Keywords: spec
Depends on:
Blocks:
 
Reported: 2010-05-23 21:39 UTC by Ellery Newcomer
Modified: 2015-06-09 05:15 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Ellery Newcomer 2010-05-23 21:39:25 UTC
for D2, the spec is missing description of the following:

auto i = cast(const) 1;
auto i = cast(const shared) 1;
{etc}
auto i = cast() 1;

Love that last one.
Comment 1 Ellery Newcomer 2010-11-24 14:20:49 UTC
surprised to find out that the last one actually does something:

const(uint) i;
const(uint[]) j;

assert(is(typeof( cast() i) == uint));
assert(is(typeof( cast() j) == const(uint)[]));

and here I was assuming it was a typo.
Comment 2 Walter Bright 2012-01-23 17:50:43 UTC
This is already fixed.