mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Small update to diagnostics to avoid the word yet
This commit is contained in:
@@ -1779,8 +1779,8 @@ NOTE(overridden_near_match_here,none,
|
||||
"potential overridden %0 %1 here",
|
||||
(DescriptiveDeclKind, DeclName))
|
||||
ERROR(override_decl_extension,none,
|
||||
"declarations %select{in extensions|from extensions}0 cannot "
|
||||
"%select{override|be overridden}0 yet", (bool))
|
||||
"overriding declarations %select{in extensions|from extensions}0 "
|
||||
"is not supported", (bool))
|
||||
NOTE(overridden_here,none,
|
||||
"overridden declaration is here", ())
|
||||
ERROR(override_objc_type_mismatch_method,none,
|
||||
@@ -2056,7 +2056,7 @@ NOTE(construct_raw_representable_from_unwrapped_value,none,
|
||||
// Derived conformances
|
||||
|
||||
ERROR(cannot_synthesize_in_extension,none,
|
||||
"implementation of %0 cannot be automatically synthesized in an extension yet", (Type))
|
||||
"implementation of %0 cannot be automatically synthesized in an extension", (Type))
|
||||
|
||||
ERROR(broken_raw_representable_requirement,none,
|
||||
"RawRepresentable protocol is broken: unexpected requirement", ())
|
||||
|
||||
@@ -138,7 +138,7 @@ class B : A {
|
||||
}
|
||||
|
||||
extension B {
|
||||
override func overriddenInExtension() {} // expected-error{{declarations in extensions cannot override yet}}
|
||||
override func overriddenInExtension() {} // expected-error{{overriding declarations in extensions is not supported}}
|
||||
}
|
||||
|
||||
struct S {
|
||||
|
||||
@@ -6,7 +6,7 @@ class B : A {
|
||||
func g() -> (B, B) { return (B(), B()) } // expected-error {{declaration 'g()' cannot override more than one superclass declaration}}
|
||||
override func h() -> (A, B) { return (B(), B()) } // expected-note {{'h()' previously overridden here}}
|
||||
override func h() -> (B, A) { return (B(), B()) } // expected-error {{'h()' has already been overridden}}
|
||||
func i() {} // expected-error {{declarations from extensions cannot be overridden yet}}
|
||||
func i() {} // expected-error {{overriding declarations from extensions is not supported}}
|
||||
override func j() -> Int { return 0 }
|
||||
func j() -> Float { return 0.0 }
|
||||
func k() -> Float { return 0.0 }
|
||||
|
||||
@@ -83,8 +83,8 @@ class C_Derived : C {
|
||||
override class func f2() {}
|
||||
class override func f3() {}
|
||||
|
||||
override class func ef2() {} // expected-error {{declarations from extensions cannot be overridden yet}}
|
||||
class override func ef3() {} // expected-error {{declarations from extensions cannot be overridden yet}}
|
||||
override class func ef2() {} // expected-error {{overriding declarations from extensions is not supported}}
|
||||
class override func ef3() {} // expected-error {{overriding declarations from extensions is not supported}}
|
||||
override static func f7() {} // expected-error {{static method overrides a 'final' class method}}
|
||||
}
|
||||
|
||||
@@ -98,11 +98,11 @@ class C_Derived3 : C {
|
||||
}
|
||||
|
||||
extension C_Derived {
|
||||
override class func f4() {} // expected-error {{declarations in extensions cannot override yet}}
|
||||
class override func f5() {} // expected-error {{declarations in extensions cannot override yet}}
|
||||
override class func f4() {} // expected-error {{overriding declarations in extensions is not supported}}
|
||||
class override func f5() {} // expected-error {{overriding declarations in extensions is not supported}}
|
||||
|
||||
override class func ef4() {} // expected-error {{declarations in extensions cannot override yet}}
|
||||
class override func ef5() {} // expected-error {{declarations in extensions cannot override yet}}
|
||||
override class func ef4() {} // expected-error {{overriding declarations in extensions is not supported}}
|
||||
class override func ef5() {} // expected-error {{overriding declarations in extensions is not supported}}
|
||||
}
|
||||
|
||||
protocol P {
|
||||
|
||||
@@ -28,8 +28,8 @@ extension A {
|
||||
class B : A { }
|
||||
|
||||
extension B {
|
||||
func f1() { } // expected-error{{declarations in extensions cannot override yet}}
|
||||
func f2() -> B { } // expected-error{{declarations in extensions cannot override yet}}
|
||||
func f1() { } // expected-error{{overriding declarations in extensions is not supported}}
|
||||
func f2() -> B { } // expected-error{{overriding declarations in extensions is not supported}}
|
||||
|
||||
override func f3() { } // expected-error{{cannot override a non-dynamic class declaration from an extension}}
|
||||
override func f4() -> ObjCClassB { } // expected-error{{cannot override a non-dynamic class declaration from an extension}}
|
||||
@@ -46,8 +46,8 @@ extension B {
|
||||
override func f3D() { }
|
||||
override func f4D() -> ObjCClassB { }
|
||||
|
||||
func f5() { } // expected-error{{declarations in extensions cannot override yet}}
|
||||
func f6() -> A { } // expected-error{{declarations in extensions cannot override yet}}
|
||||
func f5() { } // expected-error{{overriding declarations in extensions is not supported}}
|
||||
func f6() -> A { } // expected-error{{overriding declarations in extensions is not supported}}
|
||||
|
||||
@objc override func f7() { }
|
||||
@objc override func f8() -> ObjCClassA { }
|
||||
|
||||
@@ -129,5 +129,5 @@ class C6 : Codable {
|
||||
// Classes cannot yet synthesize Encodable or Decodable in extensions.
|
||||
class C7 {}
|
||||
extension C7 : Codable {}
|
||||
// CHECK: error: implementation of 'Decodable' cannot be automatically synthesized in an extension yet
|
||||
// CHECK: error: implementation of 'Encodable' cannot be automatically synthesized in an extension yet
|
||||
// CHECK: error: implementation of 'Decodable' cannot be automatically synthesized in an extension
|
||||
// CHECK: error: implementation of 'Encodable' cannot be automatically synthesized in an extension
|
||||
|
||||
@@ -91,7 +91,7 @@ extension S6 : Codable {}
|
||||
// CHECK: note: protocol requires initializer 'init(from:)' with type 'Decodable'
|
||||
// CHECK: note: cannot automatically synthesize 'Decodable' because 'b' does not have a matching CodingKey and does not have a default value
|
||||
|
||||
// CHECK: error: implementation of 'Decodable' cannot be automatically synthesized in an extension yet
|
||||
// CHECK: error: implementation of 'Decodable' cannot be automatically synthesized in an extension
|
||||
|
||||
// }
|
||||
|
||||
@@ -115,6 +115,6 @@ extension S6 : Codable {}
|
||||
// CHECK: note: CodingKey case 'b2' does not match any stored properties
|
||||
// CHECK: note: CodingKey case 'c2' does not match any stored properties
|
||||
|
||||
// CHECK: error: implementation of 'Encodable' cannot be automatically synthesized in an extension yet
|
||||
// CHECK: error: implementation of 'Encodable' cannot be automatically synthesized in an extension
|
||||
|
||||
// }
|
||||
|
||||
@@ -1126,7 +1126,7 @@ class rdar17391625derived : rdar17391625 {
|
||||
|
||||
extension rdar17391625derived {
|
||||
// Not a stored property, computed because it is an override.
|
||||
override var prop: Int { // expected-error {{declarations in extensions cannot override yet}}
|
||||
override var prop: Int { // expected-error {{overriding declarations in extensions is not supported}}
|
||||
didSet {
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user