Skip to content

Commit ce097cf

Browse files
authored
Rectified to is not a member of Boolean error
Due to the order of evaluation, 1.to(10) == 1 gets evaluated to False and the expression becomes False to 10
1 parent 8a55584 commit ce097cf

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)