Files
swift-mirror/test/decl/init/basic_init.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

26 lines
585 B
Swift

// RUN: %target-typecheck-verify-swift
class Foo {
func bar(_: bar) {} // expected-error{{use of undeclared type 'bar'}}
}
class C {
var triangle : triangle // expected-error{{use of undeclared type 'triangle'}}
init() {}
}
typealias t = t // expected-error {{redundant type alias declaration}}{{1-17=}}
// <rdar://problem/17564699> QoI: Structs should get convenience initializers
struct MyStruct {
init(k: Int) {
}
convenience init() { // expected-error {{delegating initializers in structs are not marked with 'convenience'}} {{3-15=}}
self.init(k: 1)
}
}