From 74909d78120b9200d776e188d8b43b55634638e4 Mon Sep 17 00:00:00 2001 From: Patrik Date: Fri, 21 Jun 2019 15:37:23 +0200 Subject: [PATCH] Make the equality executable in the scala shell When I run the following I get an error. ``` scala> 1.to(10) == 1 to 10 :12: error: value to is not a member of Boolean 1.to(10) == 1 to 10 ``` The expected result should be ``` scala> 1.to(10) == (1 to 10) res5: Boolean = true ``` in my opinion. --- src/main/scala/scalatutorial/sections/TermsAndTypes.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/scalatutorial/sections/TermsAndTypes.scala b/src/main/scala/scalatutorial/sections/TermsAndTypes.scala index 445812cb..6ae8d7d6 100644 --- a/src/main/scala/scalatutorial/sections/TermsAndTypes.scala +++ b/src/main/scala/scalatutorial/sections/TermsAndTypes.scala @@ -143,7 +143,7 @@ object TermsAndTypes extends ScalaTutorialSection { * The infix syntax can also be used with regular methods: * * {{{ - * 1.to(10) == 1 to 10 + * 1.to(10) == (1 to 10) * }}} * * Any method with a parameter can be used like an infix operator.