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
15 lines
605 B
Swift
15 lines
605 B
Swift
// RUN: %target-swift-frontend -c -verify -primary-file %s %S/Inputs/other_file_protocol_default_implementation_witness.swift
|
|
|
|
// https://github.com/apple/swift/issues/55897
|
|
// Test missing protocol requirement `@differentiable` attribute errors for
|
|
// protocol witnesses declared in a different file than the protocol
|
|
// conformance.
|
|
//
|
|
// This test case specifically tests protocol extension method witnesses.
|
|
|
|
import _Differentiation
|
|
|
|
// expected-error @+2 {{type 'ConformingStruct' does not conform to protocol 'P1'}}
|
|
// expected-note @+1 {{add stubs for conformance}}
|
|
struct ConformingStruct: P2 {}
|