You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 12, 2024. It is now read-only.
{
public init() { }
}
extension Foo {
open func doIt () { print("hi"); }
}
open class Bar : Foo {
override open func doIt () { print ("hi mom"); }
}
Note to future Steve:
You can define open methods in extensions, but you can't override them yet (which is the error message you get from the Swift compiler).
The good news is that this doesn't affect us since we implement extensions as extensions (whereas extensions that are defined in the same file/module as the type get promoted to methods).
The bad news is that the fix for this isn't pretty.
To fix, when the reflected data is read in, look for all extensions on types contained within that module that aren't protocol extensions, then move all the members from the extensions into the type that it extends. Gross, but effective.
The text was updated successfully, but these errors were encountered:
Note to future Steve:
You can define open methods in extensions, but you can't override them yet (which is the error message you get from the Swift compiler).
The good news is that this doesn't affect us since we implement extensions as extensions (whereas extensions that are defined in the same file/module as the type get promoted to methods).
The bad news is that the fix for this isn't pretty.
To fix, when the reflected data is read in, look for all extensions on types contained within that module that aren't protocol extensions, then move all the members from the extensions into the type that it extends. Gross, but effective.
The text was updated successfully, but these errors were encountered: