mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
AST: Remove noreturn bit from function types
This commit is contained in:
@@ -343,12 +343,6 @@ swift::classifyDynamicCast(Module *M,
|
||||
if (sourceFunction->throws() && !targetFunction->throws())
|
||||
return DynamicCastFeasibility::WillFail;
|
||||
|
||||
// A noreturn source function can be cast to a returning target type,
|
||||
// but not vice versa.
|
||||
// (noreturn isn't really reified at runtime though.)
|
||||
if (targetFunction->isNoReturn() && !sourceFunction->isNoReturn())
|
||||
return DynamicCastFeasibility::WillFail;
|
||||
|
||||
// The cast can't change the representation at runtime.
|
||||
if (targetFunction->getRepresentation()
|
||||
!= sourceFunction->getRepresentation())
|
||||
|
||||
Reference in New Issue
Block a user