You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: test/Sema/accessibility_private.swift
+5-4
Original file line number
Diff line number
Diff line change
@@ -207,13 +207,14 @@ extension Container {
207
207
fileprivateclassPrivateGenericUser<T>where T:PrivateInnerClass{} // expected-error {{generic class cannot be declared fileprivate because its generic requirement uses a private type}} {{none}}
208
208
}
209
209
210
-
fileprivatestructSR2579{
210
+
// https://github.com/apple/swift/issues/45184
211
+
fileprivatestructC_45184{
211
212
privatestructInner{
212
213
privatestructInnerPrivateType{}
213
-
varinnerProperty=InnerPrivateType() // expected-error {{property must be declared private because its type 'SR2579.Inner.InnerPrivateType' uses a private type}}
214
+
varinnerProperty=InnerPrivateType() // expected-error {{property must be declared private because its type 'C_45184.Inner.InnerPrivateType' uses a private type}}
214
215
}
215
216
// FIXME: We need better errors when one access violation results in more
216
217
// downstream.
217
-
privatevarouterProperty=Inner().innerProperty // expected-error {{property cannot be declared in this context because its type 'SR2579.Inner.InnerPrivateType' uses a private type}}
218
-
varouterProperty2=Inner().innerProperty // expected-error {{property must be declared private because its type 'SR2579.Inner.InnerPrivateType' uses a private type}}
218
+
privatevarouterProperty=Inner().innerProperty // expected-error {{property cannot be declared in this context because its type 'C_45184.Inner.InnerPrivateType' uses a private type}}
219
+
varouterProperty2=Inner().innerProperty // expected-error {{property must be declared private because its type 'C_45184.Inner.InnerPrivateType' uses a private type}}
Copy file name to clipboardexpand all lines: test/Sema/diag_non_ephemeral.swift
+2-1
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,8 @@ takesOptMutableRaw(&arr) // expected-error {{cannot use inout expression here; a
47
47
// expected-note@-1 {{implicit argument conversion from '[Int8]' to 'UnsafeMutableRawPointer?' produces a pointer valid only for the duration of the call to 'takesOptMutableRaw'}}
48
48
// expected-note@-2 {{use the 'withUnsafeMutableBytes' method on Array in order to explicitly convert argument to buffer pointer valid for a defined scope}}
49
49
50
-
// FIXME(SR-9100): This currently uses inout-to-pointer instead of array-to-pointer.
50
+
// FIXME: This currently uses inout-to-pointer instead of array-to-pointer
51
+
// (https://github.com/apple/swift/issues/51597).
51
52
takesOptMutableRaw(&optionalArr)
52
53
53
54
takesOptConst(arr) // expected-error {{cannot pass '[Int8]' to parameter; argument #1 must be a pointer that outlives the call to 'takesOptConst'}}
// expected-note@-1 {{implicit argument conversion from '[Int8]' to 'UnsafeMutableRawPointer?' produces a pointer valid only for the duration of the call to 'takesOptMutableRaw'}}
48
48
// expected-note@-2 {{use the 'withUnsafeMutableBytes' method on Array in order to explicitly convert argument to buffer pointer valid for a defined scope}}
49
49
50
-
// FIXME(SR-9100): This currently uses inout-to-pointer instead of array-to-pointer.
50
+
// FIXME: This currently uses inout-to-pointer instead of array-to-pointer
51
+
// (https://github.com/apple/swift/issues/51597).
51
52
takesOptMutableRaw(&optionalArr)
52
53
53
54
takesOptConst(arr) // expected-warning {{cannot pass '[Int8]' to parameter; argument #1 must be a pointer that outlives the call to 'takesOptConst'}}
Copy file name to clipboardexpand all lines: test/Sema/diag_use_before_declaration.swift
+12-11
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
// RUN: %target-typecheck-verify-swift
2
2
3
-
// SR-5163
4
-
func sr5163(){
3
+
// https://github.com/apple/swift/issues/47739
4
+
do{
5
5
func foo(_ x:Int)->Int?{return1}
6
6
7
7
func fn(){
@@ -11,17 +11,18 @@ func sr5163() {
11
11
}
12
12
}
13
13
14
-
// SR-6726
14
+
// https://github.com/apple/swift/issues/49275
15
+
15
16
varfoo:Int?
16
17
17
-
functest(){
18
+
test:do{
18
19
guardlet bar = foo else{
19
-
return
20
+
break test
20
21
}
21
22
letfoo=String(bar) // expected-warning {{initialization of immutable value 'foo' was never used; consider replacing with assignment to '_' or removing it}}
22
23
}
23
24
24
-
// SR-7660
25
+
// https://github.com/apple/swift/issues/50200
25
26
classC{
26
27
varvariable:Int?
27
28
func f(){
@@ -30,16 +31,16 @@ class C {
30
31
}
31
32
}
32
33
33
-
// SR-7517
34
-
func testExample(){
34
+
// https://github.com/apple/swift/issues/50059
35
+
do{
35
36
letapp= app2 // expected-error {{use of local variable 'app2' before its declaration}}
0 commit comments