Skip to content

[SR-10696] Compiler crash on S.Type.Type base of attempted call using 'type(of:)' #53093

@hamishknight

Description

@hamishknight
Previous ID SR-10696
Radar None
Original Reporter @hamishknight
Type Bug
Status Closed
Resolution Done
Environment

Swift version 5.0-dev (LLVM 082dec2e22, Swift dc35c6a164)
Target: x86_64-apple-darwin18.5.0

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, CompilerCrash, TypeChecker
Assignee @hamishknight
Priority Medium

md5: 598210301250f25a9936bf09983b62f8

Issue Description:

The following crashes the compiler:

struct S {
  func bar(_ s: S.Type) {
    type(of: s)()
  }
}

Metadata

Metadata

Assignees

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 softwaretype checkerArea → compiler: Semantic analysis

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions