Skip to content

Commit 74909d7

Browse files
authored
Make the equality executable in the scala shell
When I run the following I get an error. ``` scala> 1.to(10) == 1 to 10 <console>: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.
1 parent d481bef commit 74909d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/scala/scalatutorial/sections/TermsAndTypes.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ object TermsAndTypes extends ScalaTutorialSection {
143143
* The infix syntax can also be used with regular methods:
144144
*
145145
* {{{
146-
* 1.to(10) == 1 to 10
146+
* 1.to(10) == (1 to 10)
147147
* }}}
148148
*
149149
* Any method with a parameter can be used like an infix operator.

0 commit comments

Comments
 (0)