AST: Remove noreturn bit from function types

This commit is contained in:
Slava Pestov
2016-07-21 12:35:18 -07:00
parent 5a71bd5321
commit 57c58176bc
33 changed files with 51 additions and 204 deletions

View File

@@ -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())