mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
19 lines
372 B
Swift
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
|
|
}
|
|
}
|