Files
swift-mirror/test/attr/attr_indirect.swift
David Farler b7d17b25ba Rename -parse flag to -typecheck
A parse-only option is needed for parse performance tracking and the
current option also includes semantic analysis.
2016-11-28 10:50:55 -08:00

21 lines
616 B
Swift

// RUN: %target-swift-frontend -typecheck -verify %s
enum Foo<T> {
indirect case A // expected-error{{enum case 'A' without associated value cannot be 'indirect'}}
indirect case B(T)
indirect case C, D(T) // expected-error{{enum case 'C' without associated value cannot be 'indirect'}}
}
indirect enum Barbie<T> {
case A, B(T)
}
indirect enum Bar<T> {
case A
indirect case B(T) // expected-error{{enum case in 'indirect' enum cannot also be 'indirect'}}
}
indirect struct Bas { // expected-error{{cannot be applied}} {{1-10=}}
indirect var x: Int // expected-error{{cannot be applied}} {{3-12=}}
}