mirror of
https://github.com/apple/swift.git
synced 2026-10-20 19:13:47 +02:00
If we have a completion token in an accessor attribute, if the introducer is missing, avoid creating the AccessorDecl with an invalid SourceLoc. Instead just bail out, same as if we had an immediate completion token. This avoids crashing in name lookup. rdar://171578403
5 lines
426 B
Swift
5 lines
426 B
Swift
// {"kind":"complete","signature":"swift::ast_scope::ASTScopeImpl::getCharSourceRangeOfScope(swift::SourceManager&, bool) const","signatureAssert":"Assertion failed: ((range.isValid()) && \"scope has invalid source range\"), function getCharSourceRangeOfScope"}
|
|
// RUN: %target-swift-ide-test -code-completion -batch-code-completion -skip-filecheck -code-completion-diagnostics -source-filename %s
|
|
var a: b {
|
|
@ #^COMPLETE^#
|