Files
swift-mirror/test/Constraints/rdar143474242.swift
Slava Pestov cda3cda132 Sema: Rework change recording in PotentialBindings::retract()
Instead of making an undo() do an infer(), let's record fine-grained
changes about what was retracted, and directly re-insert the same
elements into the data structures.
2025-02-04 20:26:12 -05:00

21 lines
421 B
Swift

// RUN: %target-typecheck-verify-swift
extension Collection {
func myMap<T>(_: (Self.Element) -> T) -> [T] { fatalError() }
}
protocol SignedInteger {}
extension SignedInteger {
init<T: BinaryFloatingPoint>(_: T) { fatalError() }
init<T: BinaryInteger>(_: T) { fatalError() }
}
struct Int32: SignedInteger {
init(_: String) {}
}
func test() {
let _: [(Int32, Float)] = (0..<1).myMap { (Int32($0), 0.0) }
}