Skip to content

Instantly share code, notes, and snippets.

@dkyowell
dkyowell / DataRace.swift
Created June 29, 2024 22:30
Why doesn't Swift 6 detect as a data race?
import Foundation
class MutableState {
var value: Int
init(value: Int) {
self.value = value
}
}
@dkyowell
dkyowell / ActorTest.swift
Last active July 1, 2024 00:25
Strange Swift 6 Compiler Behavior
import Foundation
import AVFoundation
// Using Xcode Version 16.0 beta (16A5171c), Swift 6 language mode.
// This compiles.
actor GoodActor {
var value = 0
func test() {