Files
swift-mirror/test/decl/enum/recursive_enum_declaration.swift
Slava Pestov 5cc4f2b93d Sema: Use isTypeChecking() to avoid recursively validating EnumElementDecls
Validating the argument type might validate the enum decl in malformed (or
maybe even some valid?) code. We would call computeTwice() in this case,
leading to a crash.

Also clean up some test cases.

Swift SVN r30673
2015-07-27 00:40:37 +00:00

10 lines
115 B
Swift

// RUN: %target-parse-verify-swift
enum E {
indirect case Foo(E)
case Bar
}
var e: E = .Bar
var f: E = .Foo(e)