Skip to content

[SILGen] Make #file to respect #sourceLocation #5425

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
Oct 24, 2016

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Oct 24, 2016

Currently #line respects #sourceLocation directive, but #file doesn't.

func foo(file: String = #file) {
  print(file)
}
#sourceLocation(file: "virtual.swift", line: 1)
foo()

should print virtual.swift

@rintaro rintaro force-pushed the silgen-sourcelocation branch 2 times, most recently from d264af1 to 67a4a77 Compare October 24, 2016 15:11
  func foo(f: String = #file) {
    print(f)
  }
  #sourceLocation(file: "test.swift", line: 1)
  foo()

should print "test.swift"
@rintaro rintaro force-pushed the silgen-sourcelocation branch from 67a4a77 to c994e58 Compare October 24, 2016 15:46
Copy link
Contributor

@jrose-apple jrose-apple left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gosh, how was this not tested? Thanks, Rintaro.

@rintaro
Copy link
Member Author

rintaro commented Oct 24, 2016

@swift-ci Please smoke test

@rintaro rintaro merged commit 87aaec4 into swiftlang:master Oct 24, 2016
@rintaro
Copy link
Member Author

rintaro commented Oct 24, 2016

@jrose-apple Thank you for reviewing!

@rintaro rintaro deleted the silgen-sourcelocation branch October 24, 2016 16:48
MaxDesiatov pushed a commit that referenced this pull request Sep 7, 2023
[pull] swiftwasm from main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants