D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 9652 - __traits(getAttributes) doesn't work with manifest constants
Summary: __traits(getAttributes) doesn't work with manifest constants
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
Depends on:
Blocks:
 
Reported: 2013-03-05 12:46 UTC by Jacob Carlborg
Modified: 2013-05-11 09:56 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 Jacob Carlborg 2013-03-05 12:46:35 UTC
The following code:

import std.typetuple;

@(3) enum foo = 3;

void main ()
{
    alias TypeTuple!(__traits(getAttributes, foo)) bar;
}

Results in the following error:

test.d(7): Error: first argument is not a symbol
Comment 1 github-bugzilla 2013-05-11 09:02:13 UTC
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/67fa699e45d16a396520270567fe057d59ea5800
fix Issue 9652 - __traits(getAttributes) doesn't work with manifest constants

anonymous enum fix

fix code style

style fix 2

template arguments, initialized with expression interpreted as expressions in __ traits, not as enum

Added lost spaces

add getVarExp method

move ed initialization into semantic and move semantic into getVarExp.

move check to manifestness to semanticTiargs and other changes

fix optimize condition and assign to enum test

final fixes

https://github.com/D-Programming-Language/dmd/commit/869c537d44e362d3ce6a4906b8422196eba33e50
Merge pull request #1960 from IgorStepanov/issue9652

Issue9652 -  __traits(getAttributes) doesn't work with manifest constants
Comment 2 Kenji Hara 2013-05-11 09:31:45 UTC
Pull request:
https://github.com/D-Programming-Language/dmd/pull/1960
Comment 3 9999 2013-05-11 09:56:56 UTC
It says it depends on this:
https://github.com/D-Programming-Language/phobos/pull/1283