mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This prevents a nullptr dereference in `ASTScope::unqualifiedLookup()` after querying for the `SourceFile` containing a give source location. Fixes rdar://137652856 and https://github.com/swiftlang/swift/issues/76944.
24 lines
560 B
Swift
24 lines
560 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: split-file %s %t
|
|
|
|
//--- input.swift
|
|
|
|
//--- input2.swift
|
|
func body() {
|
|
|
|
extension InvalidProto {}
|
|
|
|
//--- input3.swift
|
|
func body() {
|
|
|
|
extension InvalidProto {}
|
|
|
|
struct MyStruct {
|
|
|
|
//--- dummy.swift
|
|
|
|
// RUN: %sourcekitd-test \
|
|
// RUN: -req=open %t/input.swift -req-opts=syntactic_only=1 -print-raw-response == \
|
|
// RUN: -req=typecontextinfo -pos=4:1 %t/input.swift -text-input %t/input2.swift -- %t/input.swift == \
|
|
// RUN: -req=complete -pos=6:1 %t/input.swift -text-input %t/input3.swift -repeat-request 2 -- %t/input.swift
|