Skip to content

Commit 54e1145

Browse files
committed
Add new @_implements tests for calling through another generic context.
1 parent 717f63e commit 54e1145

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/attr/attr_implements_fp.swift

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ public func compare_FauxtingPoint<T:FauxtingPoint>(_ x: T, _ y: T) -> Bool {
101101
return x .< y
102102
}
103103

104+
public func compare_BinaryFauxtingPoint<T:BinaryFauxtingPoint>(_ x: T, _ y: T) -> Bool {
105+
return x .< y
106+
}
107+
104108
public func compare_Fauxts(_ x: Fauxt, _ y: Fauxt) -> Bool {
105109
return x .< y
106110
}
@@ -135,4 +139,15 @@ public func main() {
135139
assert(!compare_Fauxts(Fauxt.nan, Fauxt.one))
136140
assert(comparedAsFauxtsCount == 3)
137141
// CHECK: compared as Fauxts
142+
143+
assert(compare_BinaryFauxtingPoint(Fauxt.one, Fauxt.two))
144+
assert(comparedAsFauxtsCount == 4)
145+
// CHECK: compared as Fauxts
146+
assert(!compare_BinaryFauxtingPoint(Fauxt.one, Fauxt.nan))
147+
assert(comparedAsFauxtsCount == 5)
148+
// CHECK: compared as Fauxts
149+
assert(!compare_BinaryFauxtingPoint(Fauxt.nan, Fauxt.one))
150+
assert(comparedAsFauxtsCount == 6)
151+
// CHECK: compared as Fauxts
152+
138153
}

0 commit comments

Comments
 (0)