This is intentional—most warnings about Sendable
were backed out because they are too noisy:
You should re-enable the warnings explicitly if you want them:
https://twitter.com/olebegemann/status/1421144304127463427
If you compile your test example with -warn-concurrency
enabled, you will be warned that Car
does not conform to Sendable
, as expected.
To check it out, I put your reduced example from the GitHub bug in a file named “test.swift”, and on the command line I ran:
swiftc test.swift
# No diagnostic output, compiles as expected
swiftc -Xfrontend -warn-concurrency test.swift
test.swift:10:19: warning: type 'Car' does not conform to the 'Sendable' protocol
let s: Sendable = car
^
test.swift:2:7: note: class 'Car' does not conform to the 'Sendable' protocol
class Car {
^