Files
swift-mirror/test/Serialization/enum.swift
Doug Gregor fab5e741bd Unrevert "Sema: Make derived conformances work from extensions"
Update IRGen test for 32/64-bit differences.

Swift SVN r28988
2015-05-24 17:55:42 +00:00

39 lines
796 B
Swift

// RUN: rm -rf %t
// RUN: mkdir %t
// RUN: %target-swift-frontend -emit-module -module-name def_enum -o %t %S/Inputs/def_enum.swift %S/Inputs/def_enum_derived.swift
// RUN: llvm-bcanalyzer %t/def_enum.swiftmodule | FileCheck %s
// RUN: %target-swift-frontend -parse -I %t %s -o /dev/null
// RUN: %target-swift-frontend -emit-sil -I %t %s -o /dev/null
// CHECK-NOT: UnknownCode
import def_enum
extension Basic {
init(silly: Int) {
self.init()
self = .HasType(silly)
}
}
var a : Basic
a = .Untyped
a.doSomething()
a = .HasType(4)
a.doSomething()
var g = Generic.Left(false)
g = .Right(true)
var lazy = Lazy.Thunk({ 42 })
var comp : Computable = lazy
comp.compute()
lazy.compute()
struct Tea {}
let meal = Breakfast<Basic>.Bacon
let n = meal.rawValue
do { throw meal } catch {}