Files
swift-mirror/validation-test/IDE/crashers_2_fixed/rdar52105899.swift
Rintaro Ishizaki 091c36bc82 [CodeCompletion] Evaluate 'PatternBindingEntry' before checking the init
If a completion happens in an 'PatternBindingInitializer' context for
'TypedPattern' without any 'VarDecl', e.g.:

    let _: Int = <COMPLETION>

it crashes because 'typeCheckPatternBinding()' requires that the
'TypedPattern' has the type.

rdar://problem/52105899
2019-12-25 16:30:52 -08:00

11 lines
371 B
Swift

// RUN: %empty-directory(%t)
// RUN: echo '//DUMMY' > %t/dummy.swift
// RUN: %target-swift-ide-test -code-completion -code-completion-token=A -source-filename=%s %t/dummy.swift > /dev/null
// RUN: %target-swift-ide-test -code-completion -code-completion-token=B -source-filename=%s %t/dummy.swift > /dev/null
struct MyStruct {
let _: Int = #^A^#
}
let _: Int = #^B^#