Skip to content

Commit 5c87082

Browse files
committed
Start describing interfaces
1 parent 7483627 commit 5c87082

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

spec/06-classes.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,5 +186,20 @@ identifier is bound to the instance on which the method was called.
186186

187187
## 6.17 Interfaces
188188

189+
```
190+
<interface-declaration> ::= "interface"
191+
<identifier>
192+
("<" <type-parameter-list> ">")?
193+
("<:" <type>)?
194+
<interface-body>
195+
<semicolon>
196+
197+
<interface-body> ::= "{" <interface-member>* "}"
198+
199+
<interface-member> ::= <method>
200+
```
201+
202+
Interfaces declare the public part of classes; that is, methods but not field.
203+
189204
## 6.18 The `object` syntax
190205

0 commit comments

Comments
 (0)