Files
swift-mirror/test/SourceKit/Indexing/index_func_import.swift
Ben Langmuir 780b857a7f [index] Fix assertion failure when indexing func import
We were implicitly assuming that a function reference could only happen
in an expression, ignoring the case of
        import func Module.fooFunc

For now, this doesn't actually add the reference to the index because
initCallRefIndexSymbol doesn't allow references without a parent
expression.  We can look at adding the reference, or maybe doing
something special to the import itself separately.

rdar://problem/26496135
2016-11-15 10:56:22 -08:00

13 lines
311 B
Swift

// RUN: rm -rf %t
// RUN: mkdir -p %t
// RUN: %swift -emit-module -o %t/test_module.swiftmodule %S/Inputs/test_module.swift
// RUN: %sourcekitd-test -req=index %s -- %s -I %t | %sed_clean > %t.response
// RUN: diff -u %s.response %t.response
import func test_module.globalFunc
func test() {
globalFunc()
}