Sema: Fix crash if explicit @objc with a name is put on a deinitializer

It would be better to just ban @objc on deinit altogether, but it
was accepted in Swift 3.0.
This commit is contained in:
Slava Pestov
2017-01-27 03:01:46 -08:00
parent 7da7651345
commit 02f6bdefaa
4 changed files with 16 additions and 13 deletions

View File

@@ -2975,10 +2975,12 @@ ERROR(objc_setter_for_nonobjc_subscript,none,
ERROR(objc_enum_generic,none,
"'@objc' enum cannot be generic", ())
ERROR(objc_name_req_nullary,none,
"'@objc' %select{class|protocol|enum|enum case|property}0 must have a simple name", (int))
"'@objc' %0 must have a simple name", (DescriptiveDeclKind))
ERROR(objc_name_subscript,none,
"'@objc' subscript cannot have a name; did you mean to put "
"the name on the getter or setter?", ())
ERROR(objc_name_deinit,none,
"'@objc' deinitializer cannot have a name", ())
ERROR(objc_name_func_mismatch,none,
"'@objc' %select{initializer|method}0 name provides "
"%select{one argument name|names for %1 arguments}2, but "