Skip to content

Commit daacc38

Browse files
Merge pull request #26129 from aschwaighofer/fix_test_dynamic_replacement_opaque_result
Fix test/Interpreter/dynamic_replacement_opaque_result.swift
2 parents 4e9dfc2 + b233ca7 commit daacc38

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
protocol P {
2-
func myValue() -> Int
2+
func myValue() -> Int64
33
}
44

5-
extension Int: P {
6-
public func myValue() -> Int {
5+
extension Int64: P {
6+
public func myValue() -> Int64 {
77
return self
88
}
99

1010
}
1111

1212
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
13-
func bar(_ x: Int) -> some P {
13+
func bar(_ x: Int64) -> some P {
1414
return x
1515
}
1616

1717
struct Container {
1818
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
19-
func bar(_ x: Int) -> some P {
19+
func bar(_ x: Int64) -> some P {
2020
return x
2121
}
2222

2323
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
2424
var computedProperty : some P {
2525
get {
26-
return 2
26+
return Int64(2)
2727
}
2828
set {
2929
print("original \(newValue)")
@@ -33,7 +33,7 @@ struct Container {
3333
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
3434
subscript(_ x: Int) -> some P {
3535
get {
36-
return 2
36+
return Int64(2)
3737
}
3838
set {
3939
print("original \(newValue)")
@@ -45,7 +45,7 @@ protocol Q {}
4545

4646
struct NewType : Q {}
4747

48-
extension Int : Q {}
48+
extension Int64 : Q {}
4949

5050
public protocol Assoc {
5151
associatedtype A = Int
@@ -56,6 +56,6 @@ public protocol Assoc {
5656
struct Test : Assoc {
5757
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
5858
func act() -> some Q {
59-
return 1
59+
return Int64(1)
6060
}
6161
}

test/Interpreter/Inputs/dynamic_replacement_opaque2.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
@_private(sourceFile: "TestOpaque1.swift") import TestOpaque1
22

33
struct Pair : P {
4-
var x = 0
5-
var y = 1
6-
func myValue() -> Int{
4+
var x = Int64(0)
5+
var y = Int64(1)
6+
func myValue() -> Int64 {
77
return y
88
}
99
}
1010

1111
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
1212
@_dynamicReplacement(for:bar(_:))
13-
func _replacement_bar(y x: Int) -> some P {
13+
func _replacement_bar(y x: Int64) -> some P {
1414
return Pair()
1515
}
1616

1717
extension Container {
1818
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
1919
@_dynamicReplacement(for:bar(_:))
20-
func _replacement_bar(y x: Int) -> some P {
20+
func _replacement_bar(y x: Int64) -> some P {
2121
return Pair()
2222
}
2323

0 commit comments

Comments
 (0)