mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Loosen the assertion a bit to make the test suite pass with -O.
Running the test quite with check-swift-optimize revealed that metatypes were not covered by the assert, even though it may occur in the real code. Swift SVN r28297
This commit is contained in:
@@ -239,8 +239,9 @@ swift::classifyDynamicCast(Module *M,
|
||||
target.getStructOrBoundGenericStruct() ||
|
||||
isa<TupleType>(target) ||
|
||||
isa<SILFunctionType>(target) ||
|
||||
isa<FunctionType>(target)) &&
|
||||
"Target should be an enum, struct, tuple or function type");
|
||||
isa<FunctionType>(target) ||
|
||||
isa<MetatypeType>(target)) &&
|
||||
"Target should be an enum, struct, tuple, metatype or function type");
|
||||
return DynamicCastFeasibility::WillFail;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user