Open mayoff opened 3 years ago
This triggers an ASTVerifier failure.
type is not an l-value in LHS of assignment: Int
@swift-ci create
Stack trace update:
type is not an l-value in LHS of assignment: Int
Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the crash backtrace.
Stack dump:
0. Program arguments: bin/swift-frontend /Users/mac/Desktop/test.swift -emit-silgen
1. Swift version 5.9-dev (LLVM 91080e65df791d6, Swift c1d5118c21d)
2. Compiling with the current language version
3. While walking into 'MyClass' (at /Users/mac/Desktop/test.swift:94:1)
4. While walking into body of setter for property (at /Users/mac/Desktop/test.swift:96:9)
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0 swift-frontend 0x0000000106447847 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 39
1 swift-frontend 0x0000000106446b25 llvm::sys::RunSignalHandlers() + 85
2 swift-frontend 0x0000000106447e90 SignalHandler(int) + 288
3 libsystem_platform.dylib 0x00007ff815a94dfd _sigtramp + 29
4 libsystem_platform.dylib 0x00007ff7bf5dbdb8 _sigtramp + 18446744072261758936
5 libsystem_c.dylib 0x00007ff8159cad24 abort + 123
6 swift-frontend 0x0000000106c20003 (anonymous namespace)::Verifier::checkLValue(swift::Type, char const*) (.cold.3) + 131
7 swift-frontend 0x0000000101f76b54 (anonymous namespace)::Verifier::checkLValue(swift::Type, char const*) + 116
8 swift-frontend 0x0000000101f6cbbc (anonymous namespace)::Verifier::walkToExprPost(swift::Expr*) + 20812
9 swift-frontend 0x0000000101f7aa19 (anonymous namespace)::Traversal::doIt(swift::Expr*) + 137
10 swift-frontend 0x0000000101f7c493 swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Stmt*) + 195
11 swift-frontend 0x0000000101f7ab0d (anonymous namespace)::Traversal::doIt(swift::Stmt*) + 109
12 swift-frontend 0x0000000101f7f1b8 (anonymous namespace)::Traversal::visitAbstractFunctionDecl(swift::AbstractFunctionDecl*) + 712
13 swift-frontend 0x0000000101f7b0b5 (anonymous namespace)::Traversal::doIt(swift::Decl*) + 293
14 swift-frontend 0x0000000101f7da70 swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Decl*) + 1040
15 swift-frontend 0x0000000101f7b0b5 (anonymous namespace)::Traversal::doIt(swift::Decl*) + 293
16 swift-frontend 0x0000000101f7cbe6 swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Pattern*) + 198
17 swift-frontend 0x0000000101f7ac2d (anonymous namespace)::Traversal::doIt(swift::Pattern*) + 109
18 swift-frontend 0x0000000101f7cc00 swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Pattern*) + 224
19 swift-frontend 0x0000000101f7ac2d (anonymous namespace)::Traversal::doIt(swift::Pattern*) + 109
20 swift-frontend 0x0000000101f7e4a1 swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Decl*) + 3649
21 swift-frontend 0x0000000101f7b0b5 (anonymous namespace)::Traversal::doIt(swift::Decl*) + 293
22 swift-frontend 0x0000000101f7ebed (anonymous namespace)::Traversal::visitNominalTypeDecl(swift::NominalTypeDecl*) + 653
23 swift-frontend 0x0000000101f7b0b5 (anonymous namespace)::Traversal::doIt(swift::Decl*) + 293
24 swift-frontend 0x0000000101f7af7b swift::Decl::walk(swift::ASTWalker&) + 27
25 swift-frontend 0x000000010213dca2 swift::SourceFile::walk(swift::ASTWalker&) + 322
26 swift-frontend 0x0000000101f666a0 swift::verify(swift::SourceFile&) + 80
27 swift-frontend 0x000000010225bf4a swift::TypeCheckSourceFileRequest::cacheResult(std::__1::tuple<>) const + 74
28 swift-frontend 0x0000000101cf8950 llvm::Expected<swift::TypeCheckSourceFileRequest::OutputType> swift::Evaluator::getResultCached<swift::TypeCheckSourceFileRequest, (void*)0>(swift::TypeCheckSourceFileRequest const&) + 96
29 swift-frontend 0x0000000101cf669f swift::TypeCheckSourceFileRequest::OutputType swift::evaluateOrDefault<swift::TypeCheckSourceFileRequest>(swift::Evaluator&, swift::TypeCheckSourceFileRequest, swift::TypeCheckSourceFileRequest::OutputType) + 31
30 swift-frontend 0x0000000100bb4e1c bool llvm::function_ref<bool (swift::SourceFile&)>::callback_fn<swift::CompilerInstance::performSema()::$_7>(long, swift::SourceFile&) + 12
31 swift-frontend 0x0000000100bab93e swift::CompilerInstance::forEachFileToTypeCheck(llvm::function_ref<bool (swift::SourceFile&)>) + 174
32 swift-frontend 0x0000000100bab86b swift::CompilerInstance::performSema() + 75
33 swift-frontend 0x0000000100994c83 performCompile(swift::CompilerInstance&, int&, swift::FrontendObserver*) + 659
34 swift-frontend 0x0000000100993b20 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 3232
35 swift-frontend 0x00000001009590b3 swift::mainEntry(int, char const**) + 1203
36 dyld 0x000000012786052e start + 462
Abort trap: 6
Ran into this today using Xcode 15.4/Swift 5.10
Environment
Xcode 13b5 Apple Swift version 5.5 (swiftlang-1300.0.29.102 clang-1300.0.28.1) macOS 11.5.2 (20G95)Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | Compiler | |Labels | Bug, CompilerCrash | |Assignee | None | |Priority | Medium | md5: a8ac5f48b8e4501926af3c48669cc2ebIssue Description:
Source code:
Compiler crash:
Uncommenting the setter (
set { }
) eliminates the crash.