D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 8812 - functionAttributes doesn't returns const/immutable/shraed/inout attributs
Summary: functionAttributes doesn't returns const/immutable/shraed/inout attributs
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-13 07:53 UTC by SHOO
Modified: 2020-03-21 03: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 SHOO 2012-10-13 07:53:55 UTC
This code doesn't work:
-------------------------------------
import std.traits;
class A
{
	void foo() const { }
}

void main()
{
	auto a = new A;
	static assert(functionAttributes!(a.foo) != FunctionAttribute.none);
}
-------------------------------------

functionAttributes does not consider these attributes now.
functionAttributes should consider these attributes.
Or there should be a different method to examine it. (eg. functionQualifiers
Comment 1 ted 2015-08-22 07:23:35 UTC
dmd2.068, linux, 64bit

Code works as expected.