Created
November 16, 2015 18:00
-
-
Save H2CO3/1dab58d24610e1f9e79d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ swift tree.swift | |
tree.swift:1:8: error: recursive value type 'Node' is not allowed | |
struct Node { | |
^ | |
0 swift 0x000000010248933b llvm::sys::PrintStackTrace(__sFILE*) + 43 | |
1 swift 0x0000000102489a7b SignalHandler(int) + 379 | |
2 libsystem_platform.dylib 0x00007fff95d1bf1a _sigtramp + 26 | |
3 libsystem_platform.dylib 0x00007fff5f689e20 _sigtramp + 3382107936 | |
4 swift 0x000000010067889b swift::irgen::TypeConverter::convertAnyNominalType(swift::CanType, swift::NominalTypeDecl*) + 379 | |
5 swift 0x0000000100678295 swift::irgen::TypeConverter::convertType(swift::CanType) + 181 | |
6 swift 0x00000001006779ad swift::irgen::TypeConverter::getTypeEntry(swift::CanType) + 621 | |
7 swift 0x0000000100677534 swift::irgen::IRGenModule::getTypeInfo(swift::SILType) + 20 | |
8 swift 0x0000000100651326 addValueWitnessesForAbstractType(swift::irgen::IRGenModule&, swift::CanType, llvm::SmallVectorImpl<llvm::Constant*>&) + 102 | |
9 swift 0x0000000100651226 swift::irgen::emitValueWitnessTable(swift::irgen::IRGenModule&, swift::CanType) + 70 | |
10 swift 0x000000010062493b swift::irgen::emitStructMetadata(swift::irgen::IRGenModule&, swift::StructDecl*) + 443 | |
11 swift 0x0000000100669d42 swift::irgen::IRGenModule::emitStructDecl(swift::StructDecl*) + 18 | |
12 swift 0x00000001005fb927 swift::irgen::IRGenModule::emitSourceFile(swift::SourceFile&, unsigned int) + 87 | |
13 swift 0x000000010067e635 performIRGeneration(swift::IRGenOptions&, swift::ModuleDecl*, swift::SILModule*, llvm::StringRef, llvm::LLVMContext&, swift::SourceFile*, unsigned int) + 933 | |
14 swift 0x000000010067d5a6 swift::performIRGeneration(swift::IRGenOptions&, swift::ModuleDecl*, swift::SILModule*, llvm::StringRef, llvm::LLVMContext&) + 598 | |
15 swift 0x000000010088e3ba swift::RunImmediately(swift::CompilerInstance&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, swift::IRGenOptions&, swift::SILOptions const&) + 154 | |
16 swift 0x000000010057d351 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&) + 13425 | |
17 swift 0x0000000100579cd3 frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2691 | |
18 swift 0x0000000100576354 main + 2324 | |
19 libdyld.dylib 0x00007fff8f1065c9 start + 1 | |
Stack dump: | |
0. Program arguments: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -interpret tree.swift -target x86_64-apple-darwin14.5.0 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -color-diagnostics -module-name tree | |
1. While emitting IR for source file tree.swift | |
2. While converting type 'Node' (declared at [tree.swift:1:1 - line:5:1] RangeText="struct Node { | |
let value: Int | |
let left: Node | |
let right: Node | |
}") | |
Segmentation fault: 11 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Node { | |
let value: Int | |
let left: Node | |
let right: Node | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment