Skip to content

[SR-979] Two inout crash compiler and source editor (Swift DEV Snapshots 2016-03-16) #43591

Closed
@swift-ci

Description

@swift-ci
Previous ID SR-979
Radar None
Original Reporter Loooop (JIRA User)
Type Bug
Status Closed
Resolution Done

Attachment: Download

Environment

Xcode 7.3 beta 5 with Swift DEV Snapshots 2016-03-16

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, CompilerCrash, Parser, StarterBug
Assignee manav (JIRA)
Priority Medium

md5: a73ab551a87542c95d46bb71dfd86f6e

Issue Description:

The following invalid code crash compiler and source editor (Swift DEV Snapshots 2016-03-16):

func bug( a: inout inout Int ) {}

Result:

Assertion failed: (!objectTy->is<LValueType>() && !objectTy->is<InOutType>() && "cannot have 'inout' or @lvalue wrapped inside an 'inout'"), function get, file /Users/buildnode/jenkins/workspace/oss-swift-package-osx/swift/lib/AST/ASTContext.cpp, line 3297.
0  swift                    0x0000000103e9b8ab llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 43
1  swift                    0x0000000103e9ab66 llvm::sys::RunSignalHandlers() + 70
2  swift                    0x0000000103e9bf52 SignalHandler(int) + 322
3  libsystem_platform.dylib 0x00007fff9292ceaa _sigtramp + 26
4  swift                    0x0000000104953615 FirstTarget + 72141
5  swift                    0x0000000103e9bd66 abort + 22
6  swift                    0x0000000103e9bd41 __assert_rtn + 81
7  swift                    0x0000000101de6b68 swift::InOutType::get(swift::Type) + 584
8  swift                    0x0000000101dbab71 (anonymous namespace)::TypeResolver::resolveType(swift::TypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>) + 1825
9  swift                    0x0000000101dba3ee swift::TypeChecker::resolveType(swift::TypeRepr*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 174
10 swift                    0x0000000101db94ff swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 47
11 swift                    0x0000000101d8fc71 validateParameterType(swift::ParamDecl*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, swift::TypeChecker&) + 97
12 swift                    0x0000000101d8fb03 swift::TypeChecker::typeCheckParameterList(swift::ParameterList*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*) + 115
13 swift                    0x0000000101d61717 (anonymous namespace)::DeclChecker::visitFuncDecl(swift::FuncDecl*) + 2439
14 swift                    0x0000000101d530cb (anonymous namespace)::DeclChecker::visit(swift::Decl*) + 827
15 swift                    0x0000000101d52d77 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 151
16 swift                    0x0000000101d74fd1 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1281
17 swift                    0x0000000101b3b118 swift::CompilerInstance::performSema() + 4616
18 swift                    0x000000010157d086 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&) + 790
19 swift                    0x000000010157c136 frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2838
20 swift                    0x0000000101577479 main + 2729
21 libdyld.dylib            0x00007fff86c325ad start + 1

P.S. I don't know which Components/Labels check for source editor crash.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfcrashBug: A crash, i.e., an abnormal termination of softwaregood first issueGood for newcomersparserArea → compiler: The legacy C++ parser

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions