mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Some editors use diagnostics from SourceKit to replace build issues. This causes issues if the diagnostics from SourceKit are formatted differently than the build issues. Make sure they are rendered the same way, removing most uses of `DiagnosticsEditorMode`. To do so, always emit the `add stubs for conformance` note (which previously was only emitted in editor mode) and remove all `; add <something>` suffixes from notes that state which requirements are missing. rdar://129283608
18 lines
706 B
Swift
18 lines
706 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %target-swift-frontend %S/Inputs/deserialized_witness_mismatch_other.swift -emit-module-path %t/deserialized_witness_mismatch_other.swiftmodule
|
|
// RUN: %target-swift-frontend -I %t/ %s -typecheck -verify
|
|
|
|
// Deserialized computed properties don't have a PatternBindingDecl, so
|
|
// make sure we don't expect to find one.
|
|
|
|
import deserialized_witness_mismatch_other
|
|
|
|
protocol HasCurrent {
|
|
var current: Self { get }
|
|
// expected-note@-1 {{protocol requires property 'current' with type 'TimeZone'}}
|
|
}
|
|
|
|
extension TimeZone : HasCurrent {}
|
|
// expected-error@-1 {{type 'TimeZone' does not conform to protocol 'HasCurrent'}}
|
|
// expected-note@-2 {{add stubs for conformance}}
|