mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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
11 lines
371 B
Swift
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^#
|