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 46ce3e6 commit d44bd16Copy full SHA for d44bd16
mypyc/test-data/run-classes.test
@@ -2503,3 +2503,29 @@ class C:
2503
def test_final_attribute() -> None:
2504
assert C.A == -1
2505
assert C.a == [-1]
2506
+
2507
+[case testClassWithFinalAttribute]
2508
+from typing import final
2509
2510
+@final
2511
+class C:
2512
+ def a(self) -> int:
2513
+ return 1
2514
2515
+def test_class_final_attribute() -> None:
2516
+ assert C().a() == 1
2517
2518
+[case testClassWithFinalAttributeInherited]
2519
2520
2521
+class B:
2522
2523
+ return 2
2524
2525
2526
+class C(B):
2527
2528
2529
2530
+def test_class_final_attribute_inherited() -> None:
2531
0 commit comments