mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Implement SE-0200 (extended escaping in string literals)
Supports string literals like #"foo"\n"bar"#.
This commit is contained in:
committed by
Brent Royal-Gordon
parent
5e2b705f6d
commit
4da8cbe655
14
test/Parse/raw_string_errors.swift
Normal file
14
test/Parse/raw_string_errors.swift
Normal file
@@ -0,0 +1,14 @@
|
||||
// RUN: %target-typecheck-verify-swift
|
||||
|
||||
#"\##("invalid")"#
|
||||
// expected-error@-1{{too many '#' characters in delimited escape}}
|
||||
// expected-error@-2{{invalid escape sequence in literal}}
|
||||
|
||||
####"invalid"###
|
||||
// expected-error@-1{{unterminated string literal}}
|
||||
|
||||
###"invalid"####
|
||||
// expected-error@-1{{too many '#' characters in closing delimiter}}
|
||||
// expected-error@-2{{consecutive statements on a line must be separated by ';'}}
|
||||
// expected-error@-3{{expected expression}}
|
||||
// expected-warning@-4{{string literal is unused}}
|
||||
Reference in New Issue
Block a user