Scalacheck Prop.forAll with > 8 arbitraries eta-expands under -Xsource:3 #13055
Labels
fixed in Scala 3
This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)
has PR
Milestone
Questions are not bug reports
Miles had a question:
TIL that if you ask
Prop.forAll
for more than 8 arbitraries in a test the test will silently succeed no matter what.If you hand
Prop.forAll
a function with > 8 arguments, then instead of getting back a Prop you get back an... => Prop
which is typically silently discarded in a test.Is this widely known?
It really ought not to compile.
and an answer:
This appears to be specific to Scala 2.13.x with -Xsource:3.0.0.
Reproduction steps
Scala version: 2.13.15
Normally, scalac correctly says
Problem
Incorrectly fails to fail compilation under
-Xsource:3
, but instead decides to eta-expand "unconditionally".Probably that condition should fall under
-Xsource-features
. Probably it should find a way not to compile.Dotty chooses the correct overload of
forAll
due to parameter untupling. Can we have that? It's almost Christmas (say the major retailers who are already discounting Halloween decorations).via https://discord.com/channels/632277896739946517/841617753513263144/1296796824262283347
The text was updated successfully, but these errors were encountered: