Actor seems not work with ExpressibleByIntegerLiteral

Distilling this down:

protocol P {
    associatedtype T
    init(value: T)
}

class Q {} // non sendable

actor BetterInt: P {
    init(value: Q) {}
    // ❌ Non-Sendable parameter type 'Self.T' cannot be sent from caller of protocol requirement 'init(value:)' into nonisolated implementation
}

Yet, if I remove conformance to P it compiles fine...

actor BetterInt {
    init(value: Q) {} // ✅
}

Shouldn't both of these versions result into an error? Or both compile fine?

2 Likes