Skip to content

Commit 18b1f97

Browse files
committed
Merge remote-tracking branch 'origin/master' into master-next
2 parents 74f8337 + 8f30626 commit 18b1f97

21 files changed

+43
-39
lines changed

lib/Sema/LookupVisibleDecls.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,9 @@ static void lookupDeclsFromProtocolsBeingConformedTo(
438438
continue;
439439
}
440440
if (auto *VD = dyn_cast<ValueDecl>(Member)) {
441+
if (!isDeclVisibleInLookupMode(VD, LS, FromContext))
442+
continue;
443+
441444
if (!VD->isProtocolRequirement())
442445
continue;
443446

test/AutoDiff/SIL/Parse/sildeclref_parse.sil renamed to test/AutoDiff/SIL/Parse/sildeclref.sil

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// RUN: %target-sil-opt -enable-experimental-differentiable-programming %s -module-name=sildeclref_parse | %target-sil-opt -enable-experimental-differentiable-programming -module-name=sildeclref_parse | %FileCheck %s
2-
// REQUIRES: differentiable_programming
32

43
// Parse AutoDiff derivative SILDeclRefs via `witness_method` and `class_method` instructions.
54

test/AutoDiff/SILGen/differentiable_function.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// RUN: %target-swift-frontend -emit-silgen -enable-experimental-differentiable-programming %s | %FileCheck %s
2-
// REQUIRES: differentiable_programming
32

43
// Test SILGen for `@differentiable` function typed values.
54

test/AutoDiff/SILGen/sil_differentiability_witness_silgen.swift renamed to test/AutoDiff/SILGen/sil_differentiability_witness.swift

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// RUN: %target-swift-frontend -emit-silgen -enable-experimental-differentiable-programming %s | %target-sil-opt -enable-experimental-differentiable-programming | %FileCheck %s
2-
// REQUIRES: differentiable_programming
32

43
// Test SIL differentiability witness SIL generation.
54

@@ -31,9 +30,9 @@ public func foo_vjp(_ x: Float) -> (value: Float, pullback: (Float) -> Float) {
3130
}
3231

3332
// CHECK-LABEL: // differentiability witness for foo(_:)
34-
// CHECK-NEXT: sil_differentiability_witness [serialized] [parameters 0] [results 0] @$s36sil_differentiability_witness_silgen3fooyS2fF : $@convention(thin) (Float) -> Float {
35-
// CHECK-NEXT: jvp: @AD__$s36sil_differentiability_witness_silgen3fooyS2fF__jvp_src_0_wrt_0 : $@convention(thin) (Float) -> (Float, @owned @callee_guaranteed (Float) -> Float)
36-
// CHECK-NEXT: vjp: @AD__$s36sil_differentiability_witness_silgen3fooyS2fF__vjp_src_0_wrt_0 : $@convention(thin) (Float) -> (Float, @owned @callee_guaranteed (Float) -> Float)
33+
// CHECK-NEXT: sil_differentiability_witness [serialized] [parameters 0] [results 0] @$s29sil_differentiability_witness3fooyS2fF : $@convention(thin) (Float) -> Float {
34+
// CHECK-NEXT: jvp: @AD__$s29sil_differentiability_witness3fooyS2fF__jvp_src_0_wrt_0 : $@convention(thin) (Float) -> (Float, @owned @callee_guaranteed (Float) -> Float)
35+
// CHECK-NEXT: vjp: @AD__$s29sil_differentiability_witness3fooyS2fF__vjp_src_0_wrt_0 : $@convention(thin) (Float) -> (Float, @owned @callee_guaranteed (Float) -> Float)
3736
// CHECK-NEXT: }
3837

3938
// Test internal non-generic function.
@@ -50,8 +49,8 @@ public func bar_jvp<T>(_ x: Float, _ y: T) -> (value: Float, differential: (Floa
5049
}
5150

5251
// CHECK-LABEL: // differentiability witness for bar<A>(_:_:)
53-
// CHECK-NEXT: sil_differentiability_witness hidden [parameters 0] [results 0] <τ_0_0> @$s36sil_differentiability_witness_silgen3baryS2f_xtlF : $@convention(thin) <T> (Float, @in_guaranteed T) -> Float {
54-
// CHECK-NEXT: jvp: @AD__$s36sil_differentiability_witness_silgen3baryS2f_xtlF__jvp_src_0_wrt_0_l : $@convention(thin) <τ_0_0> (Float, @in_guaranteed τ_0_0) -> (Float, @owned @callee_guaranteed (Float) -> Float)
52+
// CHECK-NEXT: sil_differentiability_witness hidden [parameters 0] [results 0] <τ_0_0> @$s29sil_differentiability_witness3baryS2f_xtlF : $@convention(thin) <T> (Float, @in_guaranteed T) -> Float {
53+
// CHECK-NEXT: jvp: @AD__$s29sil_differentiability_witness3baryS2f_xtlF__jvp_src_0_wrt_0_l : $@convention(thin) <τ_0_0> (Float, @in_guaranteed τ_0_0) -> (Float, @owned @callee_guaranteed (Float) -> Float)
5554
// CHECK-NEXT: }
5655

5756
// Test internal generic function.
@@ -76,9 +75,9 @@ func generic_vjp<T: Differentiable>(_ x: T, _ y: Float) -> (
7675
}
7776

7877
// CHECK-LABEL: // differentiability witness for generic<A>(_:_:)
79-
// CHECK-NEXT: sil_differentiability_witness hidden [parameters 0 1] [results 0] <τ_0_0 where τ_0_0 : Differentiable> @$s36sil_differentiability_witness_silgen7genericyxx_SftlF : $@convention(thin) <T> (@in_guaranteed T, Float) -> @out T {
80-
// CHECK-NEXT: jvp: @AD__$s36sil_differentiability_witness_silgen7genericyxx_SftlF__jvp_src_0_wrt_0_1_{{s|16_Differentiation}}14DifferentiableRzl : $@convention(thin) <τ_0_0 where τ_0_0 : Differentiable> (@in_guaranteed τ_0_0, Float) -> (@out τ_0_0, @owned @callee_guaranteed @substituted <τ_0_0, τ_0_1> (@in_guaranteed τ_0_0, Float) -> @out τ_0_1 for <τ_0_0.TangentVector, τ_0_0.TangentVector>)
81-
// CHECK-NEXT: vjp: @AD__$s36sil_differentiability_witness_silgen7genericyxx_SftlF__vjp_src_0_wrt_0_1_{{s|16_Differentiation}}14DifferentiableRzl : $@convention(thin) <τ_0_0 where τ_0_0 : Differentiable> (@in_guaranteed τ_0_0, Float) -> (@out τ_0_0, @owned @callee_guaranteed @substituted <τ_0_0, τ_0_1> (@in_guaranteed τ_0_0) -> (@out τ_0_1, Float) for <τ_0_0.TangentVector, τ_0_0.TangentVector>)
78+
// CHECK-NEXT: sil_differentiability_witness hidden [parameters 0 1] [results 0] <τ_0_0 where τ_0_0 : Differentiable> @$s29sil_differentiability_witness7genericyxx_SftlF : $@convention(thin) <T> (@in_guaranteed T, Float) -> @out T {
79+
// CHECK-NEXT: jvp: @AD__$s29sil_differentiability_witness7genericyxx_SftlF__jvp_src_0_wrt_0_1_{{s|16_Differentiation}}14DifferentiableRzl : $@convention(thin) <τ_0_0 where τ_0_0 : Differentiable> (@in_guaranteed τ_0_0, Float) -> (@out τ_0_0, @owned @callee_guaranteed @substituted <τ_0_0, τ_0_1> (@in_guaranteed τ_0_0, Float) -> @out τ_0_1 for <τ_0_0.TangentVector, τ_0_0.TangentVector>)
80+
// CHECK-NEXT: vjp: @AD__$s29sil_differentiability_witness7genericyxx_SftlF__vjp_src_0_wrt_0_1_{{s|16_Differentiation}}14DifferentiableRzl : $@convention(thin) <τ_0_0 where τ_0_0 : Differentiable> (@in_guaranteed τ_0_0, Float) -> (@out τ_0_0, @owned @callee_guaranteed @substituted <τ_0_0, τ_0_1> (@in_guaranteed τ_0_0) -> (@out τ_0_1, Float) for <τ_0_0.TangentVector, τ_0_0.TangentVector>)
8281
// CHECK-NEXT: }
8382

8483
public struct Foo: Differentiable {
@@ -89,7 +88,7 @@ public struct Foo: Differentiable {
8988
public var x: Float
9089

9190
// CHECK-LABEL: // differentiability witness for Foo.x.getter
92-
// CHECK-NEXT: sil_differentiability_witness [serialized] [parameters 0] [results 0] @$s36sil_differentiability_witness_silgen3FooV1xSfvg : $@convention(method) (Foo) -> Float {
91+
// CHECK-NEXT: sil_differentiability_witness [serialized] [parameters 0] [results 0] @$s29sil_differentiability_witness3FooV1xSfvg : $@convention(method) (Foo) -> Float {
9392
// CHECK-NEXT: }
9493

9594
@differentiable
@@ -98,7 +97,7 @@ public struct Foo: Differentiable {
9897
}
9998

10099
// CHECK-LABEL: // differentiability witness for Foo.init(_:)
101-
// CHECK-NEXT: sil_differentiability_witness [serialized] [parameters 0] [results 0] @$s36sil_differentiability_witness_silgen3FooVyACSfcfC : $@convention(method) (Float, @thin Foo.Type) -> Foo {
100+
// CHECK-NEXT: sil_differentiability_witness [serialized] [parameters 0] [results 0] @$s29sil_differentiability_witness3FooVyACSfcfC : $@convention(method) (Float, @thin Foo.Type) -> Foo {
102101
// CHECK-NEXT: }
103102

104103
@differentiable
@@ -107,7 +106,7 @@ public struct Foo: Differentiable {
107106
}
108107

109108
// CHECK-LABEL: // differentiability witness for Foo.method()
110-
// CHECK-NEXT: sil_differentiability_witness [serialized] [parameters 0] [results 0] @$s36sil_differentiability_witness_silgen3FooV6methodSfyF : $@convention(method) (Foo) -> Float {
109+
// CHECK-NEXT: sil_differentiability_witness [serialized] [parameters 0] [results 0] @$s29sil_differentiability_witness3FooV6methodSfyF : $@convention(method) (Foo) -> Float {
111110
// CHECK-NEXT: }
112111

113112
@differentiable
@@ -116,7 +115,7 @@ public struct Foo: Differentiable {
116115
}
117116

118117
// CHECK-LABEL: // differentiability witness for Foo.computedProperty.getter
119-
// CHECK-NEXT: sil_differentiability_witness [serialized] [parameters 0] [results 0] @$s36sil_differentiability_witness_silgen3FooV16computedPropertySfvg : $@convention(method) (Foo) -> Float {
118+
// CHECK-NEXT: sil_differentiability_witness [serialized] [parameters 0] [results 0] @$s29sil_differentiability_witness3FooV16computedPropertySfvg : $@convention(method) (Foo) -> Float {
120119
// CHECK-NEXT: }
121120

122121
@differentiable
@@ -125,7 +124,7 @@ public struct Foo: Differentiable {
125124
}
126125

127126
// CHECK-LABEL: // differentiability witness for Foo.subscript.getter
128-
// CHECK-NEXT: sil_differentiability_witness [serialized] [parameters 0] [results 0] @$s36sil_differentiability_witness_silgen3FooVSfycig : $@convention(method) (Foo) -> Float {
127+
// CHECK-NEXT: sil_differentiability_witness [serialized] [parameters 0] [results 0] @$s29sil_differentiability_witness3FooVSfycig : $@convention(method) (Foo) -> Float {
129128
// CHECK-NEXT: }
130129
}
131130

@@ -161,17 +160,17 @@ public func wrt_subset_vjp_wrt_x_y(_ tup: (Int, Int), _ x: Float, _ y: Float) ->
161160
}
162161

163162
// CHECK-LABEL: // differentiability witness for wrt_subset(_:_:_:)
164-
// CHECK-NEXT: sil_differentiability_witness [serialized] [parameters 2] [results 0] @$s36sil_differentiability_witness_silgen10wrt_subsetySfSi_Sit_S2ftF : $@convention(thin) (Int, Int, Float, Float) -> Float {
163+
// CHECK-NEXT: sil_differentiability_witness [serialized] [parameters 2] [results 0] @$s29sil_differentiability_witness10wrt_subsetySfSi_Sit_S2ftF : $@convention(thin) (Int, Int, Float, Float) -> Float {
165164
// CHECK-NEXT: }
166165

167166
// CHECK-LABEL: // differentiability witness for wrt_subset(_:_:_:)
168-
// CHECK-NEXT: sil_differentiability_witness [serialized] [parameters 3] [results 0] @$s36sil_differentiability_witness_silgen10wrt_subsetySfSi_Sit_S2ftF : $@convention(thin) (Int, Int, Float, Float) -> Float {
167+
// CHECK-NEXT: sil_differentiability_witness [serialized] [parameters 3] [results 0] @$s29sil_differentiability_witness10wrt_subsetySfSi_Sit_S2ftF : $@convention(thin) (Int, Int, Float, Float) -> Float {
169168
// CHECK-NEXT: jvp:
170169
// CHECK-NEXT: vjp:
171170
// CHECK-NEXT: }
172171

173172
// CHECK-LABEL: // differentiability witness for wrt_subset(_:_:_:)
174-
// CHECK-NEXT: sil_differentiability_witness [serialized] [parameters 2 3] [results 0] @$s36sil_differentiability_witness_silgen10wrt_subsetySfSi_Sit_S2ftF : $@convention(thin) (Int, Int, Float, Float) -> Float {
173+
// CHECK-NEXT: sil_differentiability_witness [serialized] [parameters 2 3] [results 0] @$s29sil_differentiability_witness10wrt_subsetySfSi_Sit_S2ftF : $@convention(thin) (Int, Int, Float, Float) -> Float {
175174
// CHECK-NEXT: jvp:
176175
// CHECK-NEXT: vjp:
177176
// CHECK-NEXT: }
@@ -191,8 +190,8 @@ extension P1 {
191190
}
192191

193192
// CHECK-LABEL: // differentiability witness for P1.foo()
194-
// CHECK-NEXT: sil_differentiability_witness hidden [parameters 0] [results 0] <τ_0_0 where τ_0_0 : P1> @$s36sil_differentiability_witness_silgen2P1PAAE3fooSfyF : $@convention(method) <Self where Self : P1> (@in_guaranteed Self) -> Float {
195-
// CHECK-NEXT: vjp: @AD__$s36sil_differentiability_witness_silgen2P1PAAE3fooSfyF__vjp_src_0_wrt_0_36sil_differentiability_witness_silgen2P1Rzl : $@convention(method) <τ_0_0 where τ_0_0 : P1> (@in_guaranteed τ_0_0) -> (Float, @owned @callee_guaranteed @substituted <τ_0_0> (Float) -> @out τ_0_0 for <τ_0_0.TangentVector>)
193+
// CHECK-NEXT: sil_differentiability_witness hidden [parameters 0] [results 0] <τ_0_0 where τ_0_0 : P1> @$s29sil_differentiability_witness2P1PAAE3fooSfyF : $@convention(method) <Self where Self : P1> (@in_guaranteed Self) -> Float {
194+
// CHECK-NEXT: vjp: @AD__$s29sil_differentiability_witness2P1PAAE3fooSfyF__vjp_src_0_wrt_0_29sil_differentiability_witness2P1Rzl : $@convention(method) <τ_0_0 where τ_0_0 : P1> (@in_guaranteed τ_0_0) -> (Float, @owned @callee_guaranteed @substituted <τ_0_0> (Float) -> @out τ_0_0 for <τ_0_0.TangentVector>)
196195
// CHECK-NEXT: }
197196

198197
// Test custom derivatives of functions with generic signatures and `@differentiable` attributes.

test/AutoDiff/SILGen/vtable.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// RUN: %target-swift-frontend -enable-experimental-differentiable-programming -emit-silgen %s | %FileCheck %s
2-
// REQUIRES: differentiable_programming
32

43
// Test derivative function vtable entries for `@differentiable` class members:
54
// - Methods.

test/AutoDiff/SILGen/witness_table.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// RUN: %target-swift-frontend -enable-experimental-differentiable-programming -emit-silgen %s | %FileCheck %s
2-
// REQUIRES: differentiable_programming
32

43
// Test derivative function witness table entries for `@differentiable` protocol requirements.
54

test/AutoDiff/Sema/derivative_attr_type_checking.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// RUN: %target-swift-frontend-typecheck -enable-experimental-differentiable-programming -verify %s
2-
// REQUIRES: differentiable_programming
32

43
import _Differentiation
54

test/AutoDiff/Sema/differentiable_attr_type_checking.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// RUN: %target-swift-frontend-typecheck -enable-experimental-differentiable-programming -verify %s
2-
// REQUIRES: differentiable_programming
32

43
import _Differentiation
54

test/AutoDiff/Serialization/derivative_attr.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55

66
// BCANALYZER-NOT: UnknownCode
77

8-
// REQUIRES: differentiable_programming
9-
108
import _Differentiation
119

1210
// Dummy `Differentiable`-conforming type.

test/AutoDiff/Serialization/differentiable_attr.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// RUN: %target-swift-frontend %s -emit-module -parse-as-library -o %t
33
// RUN: llvm-bcanalyzer %t/differentiable_attr.swiftmodule | %FileCheck %s -check-prefix=BCANALYZER
44
// RUN: %target-sil-opt -disable-sil-linking -enable-sil-verify-all %t/differentiable_attr.swiftmodule -o - | %FileCheck %s
5-
// REQUIRES: differentiable_programming
65

76
// TODO(TF-836): Enable this test.
87
// Blocked by TF-828: `@differentiable` attribute type-checking.

test/AutoDiff/Serialization/differentiation.swift renamed to test/AutoDiff/Serialization/differentiable_function.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-swift-frontend %s -emit-module -parse-as-library -enable-experimental-differentiable-programming -o %t
3-
// RUN: llvm-bcanalyzer %t/differentiation.swiftmodule | %FileCheck %s -check-prefix=BCANALYZER
4-
// RUN: %target-sil-opt -disable-sil-linking -enable-sil-verify-all %t/differentiation.swiftmodule -enable-experimental-differentiable-programming -o - | %FileCheck %s
3+
// RUN: llvm-bcanalyzer %t/differentiable_function.swiftmodule | %FileCheck %s -check-prefix=BCANALYZER
4+
// RUN: %target-sil-opt -disable-sil-linking -enable-sil-verify-all %t/differentiable_function.swiftmodule -enable-experimental-differentiable-programming -o - | %FileCheck %s
55

66
// BCANALYZER-NOT: UnknownCode
77

test/AutoDiff/Serialization/transpose_attr.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
// RUN: %target-sil-opt -enable-experimental-differentiable-programming -disable-sil-linking -enable-sil-verify-all %t/transpose_attr.swiftmodule -o - | %FileCheck %s
55

66
// BCANALYZER-NOT: UnknownCode
7-
// REQUIRES: differentiable_programming
87

98
// TODO(TF-838): Enable this test.
109
// Blocked by TF-830: `@transpose` attribute type-checking.

test/AutoDiff/SIL/Serialization/differentiability_witness_function_inst.sil renamed to test/AutoDiff/differentiability_witness_function_inst.sil

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,8 @@
1414
// IRGen test.
1515

1616
// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s --check-prefix=IRGEN --check-prefix %target-cpu
17-
// NOTE: `%target-cpu`-specific FileCheck lines exist because lowered function
18-
// types in LLVM IR differ between architectures.
17+
// NOTE: `%target-cpu`-specific FileCheck lines exist because lowered function types in LLVM IR differ between architectures.
1918

20-
// REQUIRES: differentiable_programming
2119
// NOTE(SR-12090): `shell` is required only to run `sed` as a SR-12090 workaround.
2220
// REQUIRES: shell
2321

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
// RUN: sed -e 's/import Swift$/import Swift; import _Differentiation/' %t/tmp.sil > %t/tmp_fixed.sil
1616
// RUN: %target-sil-opt %t/tmp_fixed.sil -module-name main -emit-sorted-sil | %FileCheck %s
1717

18-
// REQUIRES: differentiable_programming
1918
// NOTE(SR-12090): `shell` is required only to run `sed` as a SR-12090 workaround.
2019
// REQUIRES: shell
2120

test/AutoDiff/SIL/Serialization/differentiable_function_inst.sil renamed to test/AutoDiff/differentiable_function_inst.sil

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
// RUN: %target-swift-frontend -enable-experimental-differentiable-programming -emit-ir %s | %FileCheck %s --check-prefix=CHECK-IRGEN
1717

18-
// REQUIRES: differentiable_programming
1918
// NOTE(SR-12090): `shell` is required only to run `sed` as a SR-12090 workaround.
2019
// REQUIRES: shell
2120

test/AutoDiff/lit.local.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
if 'differentiable_programming' not in config.available_features:
2+
config.unsupported = True

test/AutoDiff/SIL/Serialization/sil_differentiability_witness.sil renamed to test/AutoDiff/sil_differentiability_witness.sil

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
// RUN: %target-swift-frontend -emit-ir %s | %FileCheck --check-prefix=IRGEN %s
1717

18-
// REQUIRES: differentiable_programming
1918
// NOTE(SR-12090): `shell` is required only to run `sed` as a SR-12090 workaround.
2019
// REQUIRES: shell
2120

test/AutoDiff/stdlib/differentiable_protocol.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// RUN: %target-typecheck-verify-swift
2-
// REQUIRES: differentiable_programming
32

43
import _Differentiation
54

test/AutoDiff/stdlib/differentiable_stdlib_conformances.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// RUN: %target-run-simple-swift
22
// REQUIRES: executable_test
3-
// REQUIRES: differentiable_programming
43

54
import _Differentiation
65

test/IDE/complete_value_expr.swift

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@
200200
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_DICTIONARY_LITERAL_1 | %FileCheck %s -check-prefix=SIMPLE_OBJECT_DOT
201201
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_DICTIONARY_LITERAL_2 | %FileCheck %s -check-prefix=SIMPLE_OBJECT_DOT
202202
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=COMPLETE_CALL_RESULT | %FileCheck %s -check-prefix=COMPLETE_CALL_RESULT
203+
// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-keywords=false -code-completion-token=BROKEN_CONFORMANCE | %FileCheck %s -check-prefix=BROKEN_CONFORMANCE
203204

204205
// Test code completion of expressions that produce a value.
205206

@@ -2185,3 +2186,19 @@ func testWrapSuccess(promise: Int, seal: Resolver<Void>) {
21852186
// COMPLETE_CALL_RESULT: Pattern/CurrModule: ({#Void#}, {#Bool#})[#Void#]; name=(Void, Bool)
21862187
// COMPLETE_CALL_RESULT: End completions
21872188
}
2189+
2190+
protocol BrokenConformanceP {
2191+
static func staticFunc()
2192+
func instanceFunc()
2193+
}
2194+
extension BrokenConformanceP {
2195+
static func staticFuncExtension() {}
2196+
}
2197+
struct BrokenConformanceS: BrokenConformanceP {
2198+
}
2199+
func testBrokenConformance(arg: BrokenConformanceS) {
2200+
arg.#^BROKEN_CONFORMANCE^#
2201+
// BROKEN_CONFORMANCE: Begin completions, 1 items
2202+
// BROKEN_CONFORMANCE: Decl[InstanceMethod]/Super: instanceFunc()[#Void#];
2203+
// BROKEN_CONFORMANCE: End completions
2204+
}

0 commit comments

Comments
 (0)