mirror of
https://github.com/apple/swift.git
synced 2026-10-12 14:50:47 +02:00
@c @implementation relies on matching the original C declaration. The lookup for the original C declaration was doing the wrong kind of lookup, meaning that it could only find the C declaration if it came through a bridging header, and not through a normal module import. Using unqualified lookup here finds the name appropriately. Clarify the diagnostics here as well to not talk about umbrella and bridging headers. Fixes rdar://161909754.
30 lines
752 B
Swift
30 lines
752 B
Swift
import has_accessibility
|
|
|
|
public let a = 0 // expected-note * {{did you mean 'a'?}}
|
|
internal let b = 0 // expected-note * {{did you mean 'b'?}}
|
|
private let c = 0 // expected-note 2 {{'c' declared here}}
|
|
|
|
extension Foo {
|
|
public static func a() {}
|
|
internal static func b() {}
|
|
private static func c() {} // expected-note {{'c()' declared here}}
|
|
}
|
|
|
|
struct PrivateInit {
|
|
private init() {} // expected-note {{'init()' declared here}}
|
|
}
|
|
|
|
extension Foo {
|
|
private func method() {}
|
|
private typealias TheType = Float
|
|
}
|
|
|
|
extension OriginallyEmpty {
|
|
func method() {}
|
|
typealias TheType = Float
|
|
}
|
|
|
|
private func privateInBothFiles() {}
|
|
func privateInPrimaryFile() {} // expected-note {{previously declared here}}
|
|
private func privateInOtherFile() {}
|