Files
swift-mirror/test/Sema/enum_raw_representable_multi_file.swift
Joe Groff 8338e69c86 Actually set up the 'rawValue' argument label on derived enum initializers.
Somehow, protocol conformance checking didn't actually care that this was missing...

Swift SVN r21898
2014-09-12 01:29:51 +00:00

17 lines
447 B
Swift

// RUN: %swift -parse -verify -primary-file %s %S/Inputs/enum_multi_file_helper.swift
var raw1: Int = Foo.A.rawValue
var raw2: Bar.RawValue = 0
var cooked1: Foo? = Foo(rawValue: raw1)
var cooked2: Bar? = Bar(rawValue: 22)
var cooked3: Baz? = Baz(rawValue: 0)
var cooked4: Garply? = Garply(rawValue: "A")
func consume<T: RawRepresentable>(obj: T) {}
func test() {
consume(cooked1!)
consume(cooked2!)
consume(cooked3!)
consume(cooked4!)
}