mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Existence of semantic expr (`getSemanticExpr()`) prevents ASTWalker walking into the *original* sub expressions which may cause re-typechecking failure. For example, `ConstraintGenerator::visitArrayExpr()` assumes we already visited its elements, but that's not the case if the semantic expr exists. rdar://problem/42639255
12 lines
228 B
Swift
12 lines
228 B
Swift
// RUN: %target-swift-ide-test -code-completion -code-completion-token=A -source-filename=%s
|
|
|
|
class Foo {
|
|
fileprivate var deltaY: Float = 0
|
|
|
|
func foo() {
|
|
var values: [Any]?
|
|
values = [0, deltaY, -deltaY] #^A^#
|
|
}
|
|
}
|
|
|