mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Currently, we were building an AST on document open or edit even if - `key_enablesyntaxmap` = 0 - `key_enablesubstructure` = 0 - `key_enablediagnostics` = 0 and - syntax tree transfer mode is off In those cases we were just ignoring the result. If all of the options are 0, don’t build an AST. rdar://85847659
19 lines
539 B
Swift
19 lines
539 B
Swift
enum E { case foo, bar }
|
|
func foo(x: (E) -> Void) {}
|
|
func test() {
|
|
foo(x: <#T##(E) -> Void#>)
|
|
}
|
|
|
|
// RUN: %sourcekitd-test \
|
|
// RUN: -req=open %s -- %s == \
|
|
// RUN: -req=edit -offset=0 -length=53 -replace="" -req-opts=enablesyntaxmap=0,enablesubstructure=0,enablediagnostics=0 -dont-print-response %s -- %s == \
|
|
// RUN: -req=expand-placeholder -offset=23 -length=18 %s \
|
|
// RUN: | %FileCheck %s
|
|
|
|
// CHECK: {
|
|
// CHECK: key.offset: 19,
|
|
// CHECK: key.length: 23,
|
|
// CHECK: key.sourcetext: " { <#E#> in\n<#code#>\n}"
|
|
// CHECK: }
|
|
|