[Test] Test no fix-it for access-control set in place of unrelated code

This commit is contained in:
Ahmed Mahmoud
2025-08-10 02:16:12 +03:00
parent 3cd3c048cf
commit edacf85aea

View File

@@ -347,3 +347,10 @@ package extension PkgGenericStruct where Param: InternalProto {} // expected-err
extension PkgGenericStruct where Param: InternalProto {
package func foo() {} // expected-error {{cannot declare a package instance method in an extension with internal requirements}} {{3-10=internal}}
}
func f() {}
private( // expected-error{{expected 'set' as subject of 'private' modifier}} {{9-9=set)}}
if true { // expected-error{{expected declaration}} {{none}}
f()
}
var unrelatedVar = "Swift"