mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
The code goes into its own sub-tree under 'tools' but tests go under 'test', so that running 'check-swift' will also run all the SourceKit tests. SourceKit is disabled on non-darwin platforms.
31 lines
452 B
Swift
31 lines
452 B
Swift
public class Empty {}
|
|
|
|
public class TwoInts {
|
|
var x, y : Int
|
|
|
|
public init(a : Int, b : Int) {
|
|
x = a
|
|
y = b
|
|
}
|
|
}
|
|
|
|
public class ComputedProperty {
|
|
public var value : Int {
|
|
get {
|
|
var result = 0
|
|
return result
|
|
}
|
|
set(newVal) {
|
|
// completely ignore it!
|
|
}
|
|
}
|
|
}
|
|
|
|
public protocol Prot1 { }
|
|
public protocol Prot2 : Prot1 { }
|
|
public protocol Prot3 { }
|
|
|
|
public class C2 { }
|
|
|
|
extension C2 : Prot3, Prot1, Prot2 { }
|