Fix <rdar://problem/20193929> Can't "return nil" in a convenience initializer

This falls out of the rework I did of 'self' in initializers.  We now correctly
dealloc_ref the allocated object on the failure path of a convenience init.



Swift SVN r27752
This commit is contained in:
Chris Lattner
2015-04-26 05:13:48 +00:00
parent abb34fa1b0
commit 61afbe993f
3 changed files with 18 additions and 29 deletions

View File

@@ -167,9 +167,6 @@ ERROR(assignment_to_immutable_value,sil_analysis,none,
"immutable value '%0' may not be assigned to",
(StringRef))
ERROR(self_init_must_be_called_before_failure,sil_analysis,none,
"failable convenience initializer must delegate to self.init() before "
"returning nil", ())
ERROR(object_not_fully_initialized_before_failure,sil_analysis,none,
"all stored properties of a class instance must be initialized before "
"returning nil from an initializer", ())