Skip to content

Commit 31a1f45

Browse files
committed
Add test for override modifier
1 parent aa8a328 commit 31a1f45

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

common/corpus/declarations.txt

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,3 +1025,39 @@ class Foo {
10251025
(property_identifier)
10261026
(formal_parameters)
10271027
(statement_block)))))
1028+
1029+
=====================
1030+
Override modifier
1031+
=====================
1032+
1033+
abstract class Foo {
1034+
abstract baz(): void;
1035+
}
1036+
1037+
class Bar extends Foo {
1038+
override baz() {}
1039+
}
1040+
1041+
---
1042+
1043+
(program
1044+
(abstract_class_declaration
1045+
name: (type_identifier)
1046+
body: (class_body
1047+
(abstract_method_signature
1048+
name: (property_identifier)
1049+
parameters: (formal_parameters)
1050+
return_type: (type_annotation
1051+
(predefined_type)))))
1052+
(class_declaration
1053+
name: (type_identifier)
1054+
(class_heritage
1055+
(extends_clause
1056+
(type_identifier)))
1057+
body: (class_body
1058+
(method_definition
1059+
(override_modifier)
1060+
name: (property_identifier)
1061+
parameters: (formal_parameters)
1062+
body: (statement_block))))
1063+
)

0 commit comments

Comments
 (0)