Closed GoogleCodeExporter closed 9 years ago
Forgot to mention: I'm using "org.scala-tools.testing" %% "specs" %
"1.6.6-SNAPSHOT".
Original comment by phdoerfler@gmail.com
on 30 Aug 2010 at 1:37
I do have the explanation, and I have an idea on how to fix it
There is indeed an implicit conversion to be able to transform anything to a
LazyParameter, something that's only evaluated on demand. This trick is helpful
when you want to have repeated, by-name parameters.
Unfortunately I had the smart-bad idea to name the method used to retrieve the
value "apply". So in your example, CaseClassWithOneParameter() is actually:
lazyfy(CaseClassWithOneParameter).apply()
where CaseClassWithOneParameter is the case object associated with the class!
The fix should be simple enough, just rename the "apply" method to "getValue"
and this is what I'll do,... tomorrow because it's already late here!
Thanks for finding this, another reason to be cautious with implicits!
Original comment by etorrebo...@gmail.com
on 30 Aug 2010 at 2:05
Yay, what a gorgeous explanation! :)
Thanks for your fast response and happy fixing
~ Philipp
Original comment by phdoerfler@gmail.com
on 30 Aug 2010 at 2:59
That's fixed in the latest snapshot.
Original comment by etorrebo...@gmail.com
on 30 Aug 2010 at 9:33
The compile now fails like a charm ;)
Thanks again for fixing this.
Original comment by phdoerfler@gmail.com
on 31 Aug 2010 at 12:47
Original issue reported on code.google.com by
phdoerfler@gmail.com
on 30 Aug 2010 at 1:36Attachments: