You may be running into https://bugs.swift.org/browse/SR-10257 in the Swift 5.0 compiler. This would happen if you have at least three files:
BasicViewController.swift
SomeOtherFile.swift
ExampleViewController.swift
If SomeOtherFile.swift
makes any calls to an AnyObject
-typed value, you’re compiling in wholemodule
mode, and the files are passed to the compiler in the above order (with SomeOtherFile.swift
in the middle of the two), then it seems that the compiler fails to properly infer @objc
-ness for the implementation of func tableView(_:, didSelectRowAt:)
. You can work around it by explicitly tagging it with @objc
for now.