Permalink
Browse files

Merge pull request #1064 from 9rnsr/fix9288

Issue 9288 - Parameter(Identifier|DefaultValue)Tuple report pointless errors
  • Loading branch information...
2 parents f1ad5d3 + f6f5753 commit bfb6d3d2f386abedbc9aaa850665234d040a0731 @alexrp alexrp committed Jan 10, 2013
Showing with 12 additions and 0 deletions.
  1. +12 −0 std/traits.d
View
@@ -545,8 +545,14 @@ template ParameterIdentifierTuple(func...)
}
}
else
+ {
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)
{
static if (i == PT.length)
@@ -627,8 +633,14 @@ template ParameterDefaultValueTuple(func...)
}
}
else
+ {
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)
{
static if (i == PT.length)

0 comments on commit bfb6d3d

Please sign in to comment.