Disallow certain modifiers in record parameters (#3672)

This commit is contained in:
Julien Couvreur 2020-07-14 12:06:46 -07:00 committed by GitHub
parent db9bca1e5c
commit e874c6d46e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,6 +27,8 @@ record_body
Record types are reference types, similar to a class declaration. It is an error for a record to provide
a `record_base` `argument_list` if the `record_declaration` does not contain a `parameter_list`.
Record parameters cannot use `ref`, `out` or `this` modifiers (but `in` and `params` are allowed).
## Inheritance
Records cannot inherit from classes, unless the class is `object`, and classes cannot inherit from records.