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_ibaction_decl.ID)
|
||||
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)
|
||||
return true;
|
||||
|
||||
@@ -197,3 +197,10 @@ protocol NonObjCProtocol {}
|
||||
@IBDesignable extension SomeProt {}
|
||||
|
||||
func attrNowOnType(@noescape foo: ()->()) {}
|
||||
|
||||
class InitDynType {
|
||||
init() {}
|
||||
func notInit() {
|
||||
self.init()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -200,3 +200,10 @@ protocol NonObjCProtocol {}
|
||||
@IBDesignable extension SomeProt {}
|
||||
|
||||
func attrNowOnType(foo: @noescape ()->()) {}
|
||||
|
||||
class InitDynType {
|
||||
init() {}
|
||||
func notInit() {
|
||||
self.init()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user