Files
swift-mirror/validation-test/IDE/crashers_fixed/ASTScopeImpl-getCharSourceRangeOfScope-34e018.swift
Hamish Knight 94de1a9db7 [Completion] Avoid creating accessor with invalid SourceLoc
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
2026-06-16 20:58:22 +01:00

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^#