Skip to content

[NFC] Don't rely on string interpolation of key-paths in attribute macro tests. #63117

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions test/Macros/macro_expand_attributes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ protocol P {

extension P {
func reading<EnclosingSelf, Value>(from keyPath: KeyPath<EnclosingSelf, Value>) {
print("reading from \(keyPath)")
print("reading from key-path")
}

func writing<EnclosingSelf, Value>(to keyPath: KeyPath<EnclosingSelf, Value>) {
print("writing to \(keyPath)")
print("writing to key-path")
}
}

Expand Down Expand Up @@ -90,12 +90,12 @@ class C: P {
}

var c = C()
// CHECK: reading from \C.x
// CHECK: reading from key-path
_ = c.x
// CHECK: reading from \C.y
// CHECK: reading from key-path
_ = c.y

// CHECK: writing to \C.x
// CHECK: writing to key-path
c.x = 10
// CHECK: writing to \C.y
// CHECK: writing to key-path
c.y = 100