[SE-0458] Disambiguate "unsafe" expression within string interpolation

String interpolation uses an end-of-file token, which we weren't
checking for. Fixes rdar://146493296
This commit is contained in:
Doug Gregor
2025-03-07 15:07:45 -08:00
parent 6cf56e9eb7
commit b9cb5ce791
2 changed files with 3 additions and 1 deletions

View File

@@ -207,6 +207,8 @@ func moreUnsafeFunc(unsafe: [Int]) {
// expected-warning@-1{{no unsafe operations occur within 'unsafe' expression}}
_ = unsafe[1]
_ = "\(unsafe)"
}
func yetMoreUnsafeFunc(unsafe: () -> Void) {