We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d8d275 commit 2e1264fCopy full SHA for 2e1264f
test/Compatibility/override.swift
@@ -0,0 +1,11 @@
1
+// RUN: %target-typecheck-verify-swift -parse-as-library -swift-version 3
2
+
3
+class A {
4
+ @objc func objcVirtualFunction() { } // expected-note{{overridden declaration is here}}
5
+}
6
7
+class B : A { }
8
9
+extension B {
10
+ override func objcVirtualFunction() { } // expected-warning{{cannot override a non-dynamic class declaration from an extension}}
11
test/decl/inherit/override.swift
@@ -1,4 +1,4 @@
-// RUN: %target-typecheck-verify-swift -parse-as-library
+// RUN: %target-typecheck-verify-swift -parse-as-library -swift-version 4
@objc class ObjCClassA {}
@objc class ObjCClassB : ObjCClassA {}
0 commit comments