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
Jul 15, 2016
· 2 comments
Assignees
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 softwareIRGenLLVM IR generation
I was writing some Swift extensions on Typhoon to genericise getting items out of a Typhoon Factory, and the compiler crashed while attempting to compile the following code.
Code
import Foundation
import Typhoon
extension Factory {
func getComponent<T: Any>(_: T.Type) -> T {
if let type = T.self as? AnyClass,
let component = self.getComponentForClass(type) as? T {
return component
} else if let type: Protocol = (T.self as! Protocol),
let componenet = self.getComponentForProtocol(type) as? T {
return componenet
}
fatalError()
}
}
Stack Trace
0 swift 0x0000000103c554eb llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 43
1 swift 0x0000000103c547d6 llvm::sys::RunSignalHandlers() + 70
2 swift 0x0000000103c55b4f SignalHandler(int) + 287
3 libsystem_platform.dylib 0x00007fff8ec8452a _sigtramp + 26
4 libsystem_platform.dylib 0x00007fa4cbc73d70 _sigtramp + 1023342688
5 swift 0x0000000101a71476 swift::irgen::IRGenFunction::emitObjCRetainCall(llvm::Value*) + 70
6 swift 0x0000000101ae7dbd swift::SILVisitor<(anonymous namespace)::IRGenSILFunction, void>::visit(swift::ValueBase*) + 18685
7 swift 0x0000000101adfc4b swift::irgen::IRGenModule::emitSILFunction(swift::SILFunction*) + 9787
8 swift 0x0000000101a3afd8 swift::irgen::IRGenModuleDispatcher::emitGlobalTopLevel() + 600
9 swift 0x0000000101ac6a5e performIRGeneration(swift::IRGenOptions&, swift::ModuleDecl*, swift::SILModule*, llvm::StringRef, llvm::LLVMContext&, swift::SourceFile*, unsigned int) + 1278
10 swift 0x0000000101ac6f06 swift::performIRGeneration(swift::IRGenOptions&, swift::SourceFile&, swift::SILModule*, llvm::StringRef, llvm::LLVMContext&, unsigned int) + 70
11 swift 0x00000001019aaa1c performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&) + 15004
12 swift 0x00000001019a641d frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2781
13 swift 0x00000001019a1e3c main + 1932
14 libdyld.dylib 0x00007fff999d75ad start + 1
[REDACTED]
1. While emitting IR SIL function @_TFE22*[REDACTED]*CSo7Factory12getComponenturfMxx for 'getComponent' at *[REDACTED]*/Factory+Swift.swift:14:5
The text was updated successfully, but these errors were encountered:
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 softwareIRGenLLVM IR generation
Environment
El Capitan 10.11.4 (15E65)
XCode Version 7.3 (7D175)
Additional Detail from JIRA
md5: 059bcc1857690eab8b5bde09f5f91bda
Issue Description:
I was writing some Swift extensions on Typhoon to genericise getting items out of a Typhoon Factory, and the compiler crashed while attempting to compile the following code.
Code
Stack Trace
The text was updated successfully, but these errors were encountered: