Files
swift-mirror/test/decl/protocol/req/issue-71216.swift
2024-02-24 07:25:59 -05:00

19 lines
372 B
Swift

// RUN: %target-typecheck-verify-swift
protocol RequiresIntFunction {
associatedtype A = ()
func intFunction(_ x: Int, _ a: A) -> Bool
}
struct Regular<A>: RequiresIntFunction {
func intFunction(_ x: Int, _ a: A) -> Bool {
true
}
}
struct GenericBad<A>: RequiresIntFunction {
func intFunction(_ x: some FixedWidthInteger, _ a: A) -> Bool {
true
}
}