mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Replace accidental compound literal syntax in assertion.
The point of the assertion is to provide a type-dependent value that evaluates to 'false', so that the static_assert will fire on any instantiation of the template but not on the template itself. Swift SVN r5176
This commit is contained in:
@@ -327,7 +327,9 @@ public:
|
||||
/// Look up an operator declaration.
|
||||
template <typename T>
|
||||
T *lookupOperator(Identifier name) {
|
||||
static_assert((T*){}, "Must specify prefix, postfix, or infix operator");
|
||||
// Make any non-specialized instantiations fail with a "nice" error message.
|
||||
static_assert(static_cast<T*>(nullptr),
|
||||
"Must specify prefix, postfix, or infix operator decl");
|
||||
}
|
||||
|
||||
static bool classof(const DeclContext *DC) {
|
||||
|
||||
Reference in New Issue
Block a user