Files
swift-mirror/validation-test/compiler_crashers_fixed/0048-issue-44940.swift
Hamish Knight 4e811c3a88 [test] Merge crasher directories
There is no longer much of a good reason to keep these separate,
merge them.
2025-10-18 12:51:30 +01:00

20 lines
412 B
Swift

// RUN: %target-swift-frontend %s -emit-ir
// https://github.com/apple/swift/issues/44940
public protocol Proto {
associatedtype One
associatedtype Two
static func bar<T>(elm: One, t: T) -> T
}
struct S<P: Proto> {
let x: P.Two
func foo<T>(_ t: T) -> T where P.Two == P.One {
let x: P.Two = self.x
let elm: P.One = x as! P.One
return P.bar(elm: elm, t: t)
}
}