mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
A recent PR (#77204) started to import C++ source locations into Swift. This PR flips a switch so these locations are actually used more widely. Now some of the diagnostic locations are changed, but they generally improved the quality of the diagnostics, pointing out conformances imported from Obj-C code right when they are declared.
16 lines
546 B
Swift
16 lines
546 B
Swift
// RUN: not %target-swift-frontend -typecheck %s -I %S/Inputs/custom-modules 2>&1 | %FileCheck %s
|
|
|
|
import LocalVsFileScope
|
|
|
|
func testLocalVsFileScope() {
|
|
LocalVsFileScopeBase.theFunctionInQuestion()
|
|
// CHECK: :[[@LINE-1]]:3: error: module 'LocalVsFileScopeBase' has no member named 'theFunctionInQuestion'
|
|
|
|
theFunctionInQuestion()
|
|
// CHECK: :[[@LINE-1]]:25: error: missing argument
|
|
// CHECK: LocalVsFileScope.h:{{[0-9]+}}:{{[0-9]+}}: note:
|
|
|
|
aFunctionInBase() // just make sure it's imported
|
|
// CHECK-NOT: :[[@LINE-1]]:{{[0-9]+}}:
|
|
}
|