From 3308d9fae3cdf58ea122d7de98bd2002c3b870c7 Mon Sep 17 00:00:00 2001 From: Eugene Kim Date: Thu, 27 Jun 2019 00:45:44 +0900 Subject: [PATCH] Fix deprecated method definition change a part of the source "def move(dx: Int, dy: Int) {" instead of "def move(dx: Int, dy: Int): Unit = {" "def main(args: Array[String]) {" ---> "def main(args: Array[String]): Unit = {" --- _ko/tour/classes.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_ko/tour/classes.md b/_ko/tour/classes.md index 0e3a54f558..e2aebe798b 100644 --- a/_ko/tour/classes.md +++ b/_ko/tour/classes.md @@ -19,7 +19,7 @@ previous-page: unified-types class Point(xc: Int, yc: Int) { var x: Int = xc var y: Int = yc - def move(dx: Int, dy: Int) { + def move(dx: Int, dy: Int): Unit = { x = x + dx y = y + dy } @@ -33,7 +33,7 @@ previous-page: unified-types 클래스들은 아래의 예제가 보여주는 것처럼 새로운 기본형으로 초기화된다. object Classes { - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val pt = new Point(1, 2) println(pt) pt.move(10, 10)