Files
swift-mirror/validation-test/compiler_scale/struct_members.gyb
2017-01-08 23:54:01 -08:00

20 lines
555 B
Plaintext

// RUN: %scale-test --sum-multi --typecheck --begin 5 --end 16 --step 5 --select validateDecl %s
// REQUIRES: OS=macosx
// REQUIRES: asserts
struct Struct${N} {
% if int(N) > 1:
func method(_: Struct${int(N)-1}) {}
var prop: Struct${int(N)-1} { return Struct${int(N)-1}() }
static var prop = Struct${int(N)-1}()
subscript(n: Int) -> Struct${int(N)-1} { return Struct${int(N)-1}() }
% else:
func method() {}
var prop: Int { return 0 }
static var prop = 0
subscript(n: Int) -> Int { return 0 }
% end
struct Nested {}
}