Description
Previous ID | SR-8482 |
Radar | rdar://problem/43888894 |
Original Reporter | SolaWing (JIRA User) |
Type | Bug |
Additional Detail from JIRA
Votes | 0 |
Component/s | Compiler |
Labels | Bug, RunTimeCrash |
Assignee | None |
Priority | Medium |
md5: 0cc820e84ab809309573584c993f6595
Issue Description:
import Foundation
public protocol Hello {
init()
}
extension NSObject: Hello{}
class World: NSObject {
init(arg: Int=0) {
super.init()
}
}
World() // Fatal error: Use of unimplemented initializer 'init()' for class 'main.World'
main.swift: 7: 7: Fatal error: Use of unimplemented initializer 'init()' for class 'main.World'
2018-08-07 21:35:12.009333+0800 main[88892:1650048] main.swift: 7: 7: Fatal error: Use of unimplemented initializer 'init()' for class 'main.World'
Process 88892 stopped
- thread Redundant Load Elimination Patches #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
frame #0: 0x0000000100001a5d main`World.init() at main.swift:7
4 init()
5 }
6 extension NSObject: Hello{}
-> 7 class World: NSObject {
8 init(arg: Int=0)
Unknown macro: { 9 super.init() 10 }
Target 0: (main) stopped.
(lldb) bt
-
thread Redundant Load Elimination Patches #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
-
frame #0: 0x0000000100001a5d main`World.init() at main.swift:7
frame Redundant Load Elimination Patches #1: 0x0000000100001a73 main`@objc World.init() at main.swift:0
frame Remove unnecessaryunsafeUnwrap
calls. #2: 0x0000000100001a93 main`@nonobjc NSObject.init() at main.swift:0
frame Initial implementation of a @_cdecl attribute to export top-level functions to C #3: 0x000000010000183f main`NSObject.__allocating_init() at main.swift:0
frame install Foundation via the ninja script and add the test phase for Foundation #4: 0x00000001000017ae main`main at main.swift:13
frame Only run bindings-build-record on OS X due to test flakiness on Liunx… #5: 0x00007fff52cab015 libdyld.dylib`start + 1
frame Debug Info: Don't reset the debug scope after leaving the outermost s… #6: 0x00007fff52cab015 libdyld.dylib`start + 1
(lldb)
Expected behavior:
compiler should report error. like adopt by a swift class