Skip to content

(overview) Fix zh-cn in pr#1398, with more fixes of the same page. #1401

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 25, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions _zh-cn/overviews/core/value-classes.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,12 @@ value类在以下情况下,需要真正实例化:

一个value类 ...

1. ... 必须只有一个public的构造函数。并有且只有一个public的,类型不为value类的val参数
2. ... 不能有特殊的类型参数.
3. ... 不能有嵌套或本地类、trait或对象
1. ... 必须只有一个主构造器。该构造器有且仅有一个public修饰的不可变(val)参数,且参数的类型不是用户自定义的value类
2. ... 不能有特殊的类型参数
3. ... 不能有嵌套或局部的类、特质或对象
4. ... 不能定义equals或hashCode方法。
5. ... 必须是一个顶级类,或静态访问对象的一个成员
6. ... 仅能有def为成员。尤其是,成员不能有惰性val、val或者var
5. ... 必须是一个顶级类,或静态访问对象的一个成员
6. ... 仅能有def为成员。尤其是,成员不能有惰性val、val或者var。
7. ... 不能被其它类继承。

### 限制示例
Expand Down