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/Concurrency/isolated_default_arguments.swift
+11
Original file line number
Diff line number
Diff line change
@@ -220,10 +220,21 @@ class C3 {
220
220
vary=0
221
221
}
222
222
223
+
@MainActorclassMultipleVars{
224
+
var(x, y)=(0,0)
225
+
}
226
+
223
227
func callDefaultInit()async{
224
228
_ =C2()
225
229
_ =NonIsolatedInit()
226
230
_ =NonIsolatedInit(x:10)
231
+
_ =MultipleVars()
232
+
}
233
+
234
+
// expected-warning@+1 {{default initializer for 'MultipleVarsInvalid' cannot be both nonisolated and main actor-isolated; this is an error in Swift 6}}
235
+
classMultipleVarsInvalid{
236
+
// expected-note@+1 {{initializer for property 'x' is main actor-isolated}}
0 commit comments