You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
swift-ci opened this issue
Mar 14, 2018
· 2 comments
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfcrashBug: A crash, i.e., an abnormal termination of software
$ swift --version
Apple Swift version 4.0.3 (swiftlang-900.0.74.1 clang-900.0.39.2)
Target: x86_64-apple-macosx10.9
Additional Detail from JIRA
Votes
0
Component/s
Compiler
Labels
Bug, CompilerCrash
Assignee
cogk (JIRA)
Priority
Medium
md5: 1b358fe88d6cdd3810d31d435660609b
Issue Description:
Description
When running the swift or swiftc command line tools on the following code, the compiler crashes while type-checking an init() declaration.
The following code declares a nested class inside a protocol, which is invalid.
But it also declares a subclass of the nested class, and the compiler exits with a Segmentation fault: 11.
protocol Proto {
class Nested {
// init() {}
}
}
class Subclass: Proto.Nested {
// override init() {}
}
The compiler type-checks init() even if not explicitly written in the code.
Steps to recreate the issue
Run one of the following commands :
swift file.swift
or
swiftc file.swift
Notes
I have not tested if the issue exists when running/compiling the code in an Xcode project or Playground.
I joined the stack trace produced (stderr.txt).
The text was updated successfully, but these errors were encountered:
Should be resolved by #15307 it has been merged to master. cogk (JIRA User) Thank you for report, please use next nightly master snapshot (or better one from upcoming Saturday) to verify.
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler in itselfcrashBug: A crash, i.e., an abnormal termination of software
Attachment: Download
Environment
Additional Detail from JIRA
md5: 1b358fe88d6cdd3810d31d435660609b
Issue Description:
Description
When running the swift or swiftc command line tools on the following code, the compiler crashes while type-checking an init() declaration.
The following code declares a nested class inside a protocol, which is invalid.
But it also declares a subclass of the nested class, and the compiler exits with a Segmentation fault: 11.
The compiler type-checks init() even if not explicitly written in the code.
Steps to recreate the issue
Run one of the following commands :
or
Notes
I have not tested if the issue exists when running/compiling the code in an Xcode project or Playground.
I joined the stack trace produced (stderr.txt).
The text was updated successfully, but these errors were encountered: