Skip to content

Commit

Permalink
Merge pull request #1064 from 9rnsr/fix9288
Browse files Browse the repository at this point in the history
Issue 9288 - Parameter(Identifier|DefaultValue)Tuple report pointless errors
  • Loading branch information
alexrp committed Jan 10, 2013
2 parents f1ad5d3 + f6f5753 commit bfb6d3d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions std/traits.d
Expand Up @@ -545,8 +545,14 @@ template ParameterIdentifierTuple(func...)
} }
} }
else else
{
static assert(0, func[0].stringof ~ "is not a function"); static assert(0, func[0].stringof ~ "is not a function");


// Define dummy entities to avoid pointless errors
template Get(size_t i) { enum Get = ""; }
alias TypeTuple!() PT;
}

template Impl(size_t i = 0) template Impl(size_t i = 0)
{ {
static if (i == PT.length) static if (i == PT.length)
Expand Down Expand Up @@ -627,8 +633,14 @@ template ParameterDefaultValueTuple(func...)
} }
} }
else else
{
static assert(0, func[0].stringof ~ "is not a function"); static assert(0, func[0].stringof ~ "is not a function");


// Define dummy entities to avoid pointless errors
template Get(size_t i) { enum Get = ""; }
alias TypeTuple!() PT;
}

template Impl(size_t i = 0) template Impl(size_t i = 0)
{ {
static if (i == PT.length) static if (i == PT.length)
Expand Down

0 comments on commit bfb6d3d

Please sign in to comment.