Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Issue 9317 - ParameterStorageClassTuple reports errors for inout function #1073

Merged
merged 1 commit into from

2 participants

@alexrp alexrp merged commit afe4ba1 into D-Programming-Language:master
@ghost Unknown referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@ghost Unknown referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@ghost Unknown referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@ghost Unknown referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 14, 2013
  1. @9rnsr
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 1 deletion.
  1. +6 −1 std/traits.d
View
7 std/traits.d
@@ -92,7 +92,8 @@ private
// FuncAttrs --> FuncAttr | FuncAttr FuncAttrs
// FuncAttr --> empty | Na | Nb | Nc | Nd | Ne | Nf
- while (mstr.length >= 2 && mstr[0] == 'N')
+ // except 'Ng' == inout, because it is a qualifier of function type
+ while (mstr.length >= 2 && mstr[0] == 'N' && mstr[1] != 'g')
{
if (FunctionAttribute att = LOOKUP_ATTRIBUTE[ mstr[1] ])
{
@@ -516,6 +517,10 @@ unittest
alias ParameterStorageClassTuple!((ref int a) {}) dglit_pstc;
static assert(dglit_pstc.length == 1);
static assert(dglit_pstc[0] == STC.ref_);
+
+ // Bugzilla 9317
+ static inout int func(inout int param) { return param; }
+ static assert(ParameterStorageClassTuple!(typeof(func))[0] == STC.none);
}
Something went wrong with that request. Please try again.