swiftlang / swift

The Swift Programming Language
https://swift.org
Apache License 2.0
67.53k stars 10.35k forks source link

[SR-1332] WMO causes base class implementation to be called. #43940

Open swift-ci opened 8 years ago

swift-ci commented 8 years ago
Previous ID SR-1332
Radar None
Original Reporter anlaital (JIRA User)
Type Bug
Additional Detail from JIRA | | | |------------------|-----------------| |Votes | 0 | |Component/s | | |Labels | Bug | |Assignee | None | |Priority | Medium | md5: 9b79deefb17ba85171b1a48dff732942

Issue Description:

Compiling our application with WMO enabled causes the base class implementation to be called instead of the derived override. This causes a crash, since the base class implementation simply calls fatalError.

@belkadan has access to the project in question. You must either use the Beta schema or change the Debug schema to use WMO. Then sign in and tap "Edit" on the top-right corner. Then tap "Edit categories" on the lower right corner. This crashes instantly when WMO is enabled because for some reason the compiler has decided to call the base class implementation instead of the override.

swift-ci commented 8 years ago

Comment by Antti Laitala (JIRA)

This appears to be regression in Xcode 7.3. This does not appear to be reproducible using Xcode 7.3.1 GM.

swift-ci commented 8 years ago

Comment by Antti Laitala (JIRA)

Note that using Xcode 7.3.1 GM the application compiles and functions correctly with WMO enabled, but when building in Debug mode the compiler crashes.

swift-ci commented 8 years ago

Comment by Antti Laitala (JIRA)

This might get fixed by https://bugs.swift.org/browse/SR-1206