Skip to content

Commit c065eaf

Browse files
authored
Tweak final-related docs (#4324)
Interfaces can but are not *expected* to implement static or final functions. Add links. declaration.dd: link storage class to final attribute, not final classes.
1 parent 056cd00 commit c065eaf

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

spec/declaration.dd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ $(GNAME StorageClass):
7979
$(DDSUBLINK spec/attribute, static, `static`)
8080
$(RELATIVE_LINK2 extern, $(D extern))
8181
$(DDSUBLINK spec/class, abstract, `abstract`)
82-
$(DDSUBLINK spec/class, final, `final`)
82+
$(DDSUBLINK spec/attribute, final, `final`)
8383
$(DDSUBLINK spec/function, virtual-functions, `override`)
8484
$(DDSUBLINK spec/class, synchronized-methods, `synchronized`)
8585
$(RELATIVE_LINK2 auto-declaration, `auto`)

spec/interface.dd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ I iface = new I(); // error, cannot create instance of interface
7171
$(H3 $(LNAME2 method-bodies, Interface Method Bodies))
7272

7373
$(P Virtual interface member functions do not have implementations.
74-
Interfaces are expected to implement static or final functions.
74+
Interfaces can implement $(DDSUBLINK spec/attribute, static, static)
75+
or $(DDSUBLINK spec/function, final, final) functions.
7576
)
7677

7778
------

0 commit comments

Comments
 (0)