编译器崩溃,默认输入值

时间:2015-06-10 18:45:17

标签: xcode swift

警告:** 您的计算机可能会崩溃 **

在命令行项目中使用以下代码:

var err: NSError?

func foobar(inout error: NSError? = &err) {
}

我在编译时遇到以下崩溃:

  

断言失败:(E-> getType() - > isMaterializable()&&“l-values必须   用emitLValue“)发出函数,函数emitRValue,file   /Library/Caches/com.apple.xbs/Sources/swiftlang/swiftlang-700.0.38.1/src/swift/lib/SILGen/SILGenExpr.cpp,   第3695行.0 swift 0x0000000111a84e0b   llvm :: sys :: PrintStackTrace(__ sFILE *)+ 43 1 swift
  0x0000000111a8554b SignalHandler(int)+ 379 2   libsystem_platform.dylib 0x00007fff8bf3cf1a _sigtramp + 26 3   libsystem_platform.dylib 0x00007fc80a90ca80 _sigtramp + 2124217216 4   libsystem_c.dylib 0x00007fff9747eb53 abort + 129 5   libsystem_c.dylib 0x00007fff97446c39 basename + 0 6 swift
  0x000000010fcd361c   迅速降低:: :: SILGenFunction :: emitRValue(SWIFT :: Expr的*   swift :: Lowering :: SGFContext)+ 76 7 swift
  0x000000010fd2910a   迅速降低:: :: SILGenFunction :: emitReturnExpr(SWIFT :: SILLocation,   swift :: Expr *)+ 362 8 swift 0x000000010fcf0b7c   迅速降低:: :: SILGenFunction :: emitGeneratorFunction(SWIFT :: SILDeclRef,   swift :: Expr *)+ 316 9 swift 0x000000010fc92eb6   迅速降低:: :: SILGenModule :: emitDefaultArgGenerator(SWIFT :: SILDeclRef,   swift :: Expr *)+ 198 10 swift 0x000000010fc919c7   swift :: Lowering :: SILGenModule :: emitDefaultArgGenerators(llvm :: PointerUnion,llvm :: ArrayRef)+ 295   11 swift 0x000000010fc915d3   迅速降低:: :: SILGenModule :: emitAbstractFuncDecl(SWIFT :: AbstractFunctionDecl *)   + 163 12 swift 0x000000010fc9131c swift :: Lowering :: SILGenModule :: emitFunction(swift :: FuncDecl *)+ 44 13   swift 0x000000010fc974bf   swift :: ASTVisitor :: visit(swift :: Decl *)+ 255 14 swift
  0x000000010fc9428b   迅速降低:: :: SILGenModule :: emitSourceFile(SWIFT :: *的SourceFile,   unsigned int)+ 571 15 swift 0x000000010fc9506f   swift :: SILModule :: constructSIL(swift :: ModuleDecl *,swift :: SILOptions&amp ;,,   swift :: FileUnit *,llvm :: Optional,bool,bool)+ 703 16   swift 0x000000010fc9528b   swift :: performSILGeneration(swift :: FileUnit&,swift :: SILOptions&amp ;,,   llvm :: Optional,bool)+ 123 17 swift
  0x000000010fa9e691 performCompile(swift :: CompilerInstance&amp ;,,   swift :: CompilerInvocation&,llvm :: ArrayRef,int&)+ 9153   18 swift 0x000000010fa9c0b3   frontend_main(llvm :: ArrayRef,char const *,void *)+ 2515   19 swift 0x000000010fa9828f main + 1983 20   libdyld.dylib 0x00007fff91e025c9 start + 1

有办法吗?

0 个答案:

没有答案