Files
swift-mirror/test/Interpreter/interpolation.swift
Dmitri Hrybenko 011584a0b6 stdlib/pritning: untie string interpolation from string initializers
String interpolation invokes convertFromStringInterpolationSegment() function
now.  There is no need to add extensions to String to allow custom types to
participate in string interpolation.  Just implementing Printable will do the
right thing.


Swift SVN r18104
2014-05-15 09:56:02 +00:00

21 lines
490 B
Swift

// RUN: %target-run-simple-swift | FileCheck %s
// FIXME: rdar://16168414 big int interpolation isn't working on 32-bit
// XFAIL: PTRSIZE=32
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)!")
// CHECK: value = 1099226349619
var someval = 0xFFeeFF0033
println("value = \(someval)")