Open swift-ci opened 7 years ago
TestViewCollectionViewCell.swift:18:53: error: value of type 'AnyObject' has no member 'specialMethod'
(undoManager?.prepare(withInvocationTarget: self) as AnyObject).specialMethod(test: "test")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~ ~~~~~~~~~~~~~
Interesting. I guess we're not collecting all valid Objective-C methods correctly with WMO.
@DougGregor, have you ever seen this before?
No, I haven't seen this before, but it seems plausible in a multi-file scenario that we aren't going through and exhaustively checking every class/protocol in the module for a member with that name.
Attachment: Download
Environment
iOS 9 / iOS 10Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | Compiler | |Labels | Bug, OptimizedOnly | |Assignee | None | |Priority | Medium | md5: 24cb7965aaaad6cc4a5fe90eeb3b5999Issue Description:
When I'm calling prepare: withInvocationTarget on NSUndoManager inside UIView I get a compile error (when archiving - building with whole module optimization). If I build and run (fast single file optimization) it compiles without any problem.