Skip to content
Permalink
Browse files

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
  • Loading branch information
amitsingh-10 committed Jul 9, 2019
1 parent 8a55584 commit ce097cf660a2025bbed934b399f4ae98705ff537
Showing with 1 addition and 1 deletion.
  1. +1 −1 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.

0 comments on commit ce097cf

Please sign in to comment.
You can’t perform that action at this time.