You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
=== What steps will reproduce the problem (please be specific and use wikiformatting)? ===
$$ scala
Welcome to Scala version 2.9.0.final (JavaHotSpot(TM) 64-BitServerVM, Java1.6.0_22).
Type in expressions to have them evaluated.
Type:help for more information.
scala>defrepeat(count: Int=1, x: Boolean=true)(thunk: =>Double) :Unit= (0 until count).foreach(_ => thunk)
repeat: (count: Int, x: Boolean)(thunk: =>Double)Unit
scala>defrepeat(thunk: =>Double) :Unit= repeat()(thunk)
<console>:8:error: not enough arguments for method repeat: (thunk: =>Double)Unit.
Unspecified value parameter thunk.
defrepeat(thunk: =>Double) :Unit= repeat()(thunk)
^
=== What is the expected behavior? ===
Note that in the real implementation, I would use parameterized return type, but hard-binding to Double to reduce complexity.
I expected no error.
Interestingly, if I compile similar code with scalac, it compiles fine.
=== What steps will reproduce the problem (please be specific and use wikiformatting)? ===
=== What is the expected behavior? ===
Note that in the real implementation, I would use parameterized return type, but hard-binding to Double to reduce complexity.
I expected no error.
Interestingly, if I compile similar code with scalac, it compiles fine.
=== What do you see instead? ===
I see error in REPL and no error through compiler.
=== Additional information ===
(for instance, a link to a relevant mailing list discussion)
=== What versions of the following are you using? ===
The text was updated successfully, but these errors were encountered: