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
-- [E007] TypeMismatchError:ExtensionTest.scala:19:12-----------------------19|valres="".foo
|^^|Found: ("":String)
|Required:?{ foo: ? }
|Note that implicit extension methods cannot be applied because they are ambiguous;
|both method toOps1 in objectOps and method toOps2 in objectOps provide an extension method `foo` on ("":String)
1 error found
expectation
This code compiles on Scala 2 (the by-value conversion is chosen). I ran into this issue in ScalaCheck, where importing org.scalacheck.Prop._ causes problems on Dotty:
1|true:|"foo"|^^^^^^^|value :is not a member of Boolean, but could be made available asan extension method.
||One of the following imports might fix the problem:
||importorg.scalacheck.Prop.BooleanOperators|importorg.scalacheck.Prop.propBoolean|importorg.scalacheck.Gen.const|
This should generally be easy to work around in this particular case, since there's not any good reason to import Prop._ wholesale (and also BooleanOperators is now deprecated), but that's what sbt-doctest does at the moment (I'm opening a PR there now).
I thought there was a slight chance this might be related to #8035, but compiling with #8046 gives the same error.
The text was updated successfully, but these errors were encountered:
minimized code
Compilation output
expectation
This code compiles on Scala 2 (the by-value conversion is chosen). I ran into this issue in ScalaCheck, where importing
org.scalacheck.Prop._
causes problems on Dotty:This should generally be easy to work around in this particular case, since there's not any good reason to import
Prop._
wholesale (and alsoBooleanOperators
is now deprecated), but that's what sbt-doctest does at the moment (I'm opening a PR there now).I thought there was a slight chance this might be related to #8035, but compiling with #8046 gives the same error.
The text was updated successfully, but these errors were encountered: