Files
swift-mirror/test/Serialization/Inputs/duplicate_normalprotocolconformance_input.swift
David Farler 87c3d7421f Refine static func and var syntax
rdar://problem/17198298

- Allow 'static' in protocol property and func requirements, but not 'class'.
- Allow 'static' methods in classes - they are 'class final'.
- Only allow 'class' methods in classes (or extensions of classes)
- Remove now unneeded diagnostics related to finding 'static' in previously banned places.
- Update relevant diagnostics to make the new rules clear.

Swift SVN r24260
2015-01-08 03:03:29 +00:00

19 lines
224 B
Swift

public protocol A {
static func a()
}
public protocol B : A {
static func b()
}
public struct S { public init() {} }
extension S : A {
public static func a() { }
}
extension S : B {
public static func b() { }
}