mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
e.g. "foo is \(i+j)". This implements rdar://11223686 Doug implemented all the hard parts of this. I ripped out support for nested string literals (i.e. string literals within an interpolated string), which simplified the approach and defined away some problems with his patch in progress. I plan a few refinements on top of this basic patch. Swift SVN r1738
12 lines
292 B
Swift
12 lines
292 B
Swift
// RUN: %swift %s -i | FileCheck %s
|
|
|
|
var hello = "Hello"
|
|
var pi = 3
|
|
// CHECK: Hello, world. Pi is approximately 3.
|
|
println("\(hello), world. Pi is approximately \(pi).")
|
|
|
|
// CHECK: Nested "Hello, World!" with Pi = 3!
|
|
var HW = "\(hello), World!";
|
|
println("Nested \"\(HW)\" with Pi = \(pi)!")
|
|
|