Files
swift-mirror/test/Interpreter/enum_runtime_alignment.swift
Joe Groff db0fea590e stdlib: Use unqualified names in 'print'.
Leave the qualification off of enum cases and type names when 'print'-ing them, but keep them on 'debugPrint'. (At least, at the outermost level; since ad-hoc printing of structs and tuples uses debugPrint, we'll still get qualification at depth, which kind of sucks but needs more invasive state management in print to make possible.) Implements rdar://problem/21788604.

Swift SVN r30166
2015-07-13 21:42:11 +00:00

21 lines
363 B
Swift

// RUN: %target-run-simple-swift | FileCheck %s
// REQUIRES: executable_test
struct Structure {
var a: UInt8
var b: UInt8
var c: UInt8
}
enum Enum: Int {
case One, Two, Three, Four
}
var x: [Enum: (Structure?, Structure?)] = [
.One: (Structure(a: 1, b: 2, c: 3), nil)
]
// CHECK: [One: (Optional(main.Structure(a: 1, b: 2, c: 3)), nil)]
print(x)