21
21
#include " llvm/ADT/PointerIntPair.h"
22
22
#include " llvm/Support/ErrorHandling.h"
23
23
#include " swift/AST/Availability.h"
24
+ #include " swift/AST/Decl.h"
24
25
#include " swift/AST/Type.h"
25
26
#include " swift/AST/Types.h"
26
27
@@ -132,8 +133,8 @@ class OverloadChoice {
132
133
// / Retrieve an overload choice for a declaration that was found via
133
134
// / dynamic lookup.
134
135
static OverloadChoice getDeclViaDynamic (Type base, ValueDecl *value, bool isFlattened = false ) {
135
- // assert((!isFlattened || isa<FuncDecl>(value)) &&
136
- // "can only flatten function decls");
136
+ assert ((!isFlattened || isa<FuncDecl>(value)) &&
137
+ " can only flatten function decls" );
137
138
OverloadChoice result;
138
139
result.BaseAndBits .setPointer (base);
139
140
result.DeclOrKind = reinterpret_cast <uintptr_t >(value) | 0x02 ;
@@ -145,8 +146,8 @@ class OverloadChoice {
145
146
// / bridging to an Objective-C class.
146
147
static OverloadChoice getDeclViaBridge (Type base, ValueDecl *value,
147
148
bool isFlattened = false ) {
148
- // assert((!isFlattened || isa<FuncDecl>(value)) &&
149
- // "can only flatten function decls");
149
+ assert ((!isFlattened || isa<FuncDecl>(value)) &&
150
+ " can only flatten function decls" );
150
151
OverloadChoice result;
151
152
result.BaseAndBits .setPointer (base);
152
153
result.BaseAndBits .setInt (IsBridgedBit);
@@ -159,8 +160,8 @@ class OverloadChoice {
159
160
// / by unwrapping an optional context type.
160
161
static OverloadChoice getDeclViaUnwrappedOptional (Type base, ValueDecl *value,
161
162
bool isFlattened = false ) {
162
- // assert((!isFlattened || isa<FuncDecl>(value)) &&
163
- // "can only flatten function decls");
163
+ assert ((!isFlattened || isa<FuncDecl>(value)) &&
164
+ " can only flatten function decls" );
164
165
OverloadChoice result;
165
166
result.BaseAndBits .setPointer (base);
166
167
result.BaseAndBits .setInt (IsUnwrappedOptionalBit);
0 commit comments