mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[FixCode] Don't add .dynamicType
Adding .dynamicType interacts poorly with the swift migrator by invalidating some inits with type errors. rdar://problem/26642062
This commit is contained in:
@@ -580,6 +580,10 @@ private:
|
|||||||
Info.ID == diag::invalid_ibinspectable.ID ||
|
Info.ID == diag::invalid_ibinspectable.ID ||
|
||||||
Info.ID == diag::invalid_ibaction_decl.ID)
|
Info.ID == diag::invalid_ibaction_decl.ID)
|
||||||
return false;
|
return false;
|
||||||
|
// Adding .dynamicType interacts poorly with the swift migrator by
|
||||||
|
// invalidating some inits with type errors.
|
||||||
|
if (Info.ID == diag::init_not_instance_member.ID)
|
||||||
|
return false;
|
||||||
|
|
||||||
if (Kind == DiagnosticKind::Error)
|
if (Kind == DiagnosticKind::Error)
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -197,3 +197,10 @@ protocol NonObjCProtocol {}
|
|||||||
@IBDesignable extension SomeProt {}
|
@IBDesignable extension SomeProt {}
|
||||||
|
|
||||||
func attrNowOnType(@noescape foo: ()->()) {}
|
func attrNowOnType(@noescape foo: ()->()) {}
|
||||||
|
|
||||||
|
class InitDynType {
|
||||||
|
init() {}
|
||||||
|
func notInit() {
|
||||||
|
self.init()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -200,3 +200,10 @@ protocol NonObjCProtocol {}
|
|||||||
@IBDesignable extension SomeProt {}
|
@IBDesignable extension SomeProt {}
|
||||||
|
|
||||||
func attrNowOnType(foo: @noescape ()->()) {}
|
func attrNowOnType(foo: @noescape ()->()) {}
|
||||||
|
|
||||||
|
class InitDynType {
|
||||||
|
init() {}
|
||||||
|
func notInit() {
|
||||||
|
self.init()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user