Files
swift-mirror/test/attr/accessibility_multifile.swift
Saleem Abdulrasool 64268be652 test: invoke python tools properly
Ensure that we use the correct python to run the python based tools.
This also allows these tools to run on Windows which will not
necessarily associate the python script with an interpreter (python).
2018-04-23 17:30:09 -07:00

20 lines
524 B
Swift

// RUN: %empty-directory(%t)
// RUN: %{python} %utils/split_file.py -o %t %s
// RUN: %target-swift-frontend -typecheck %t/file1.swift -primary-file %t/file2.swift -verify
// BEGIN file1.swift
private protocol P {
func privMethod()
}
public class C : P {
public init() {}
fileprivate func privMethod() {} // expected-note {{declared here}}
}
// BEGIN file2.swift
extension C {
public func someFunc() {
privMethod() // expected-error {{'privMethod' is inaccessible due to 'fileprivate' protection level}}
}
}