AT
Size: a a a
AT
AB
AB
AB
var field = new MyType(A: 1, B:2 )
AB
A
AT
AB
AB
AT
AB
AB
AB
var myEnumInstance:MyEnum = .Foo
AB
AB
func myFunc(enumArg:MyEnum) -> MyEnum { return enumArg}
myFunc(enumArg: .Foo)
AB
AB
enum Barcode {
case upc(Int, Int, Int, Int)
case qrCode(String)
}
let productBarcode = .qrCode("ABCDEFGHIJKLMNOP")
switch productBarcode {
case .upc(let numberSystem, let manufacturer, let product, let check):
print("UPC: \(numberSystem), \(manufacturer), \(product), \(check).")
case .qrCode(let productCode):
print("QR code: \(productCode).")
}
// Prints "QR code: ABCDEFGHIJKLMNOP."
AB
AB
AB