Open medale opened 1 month ago
Running this from the scala shell on Mac works as expected:
scala-cli repl -S 3.3.3
Welcome to Scala 3.3.3 (17.0.11, Java OpenJDK 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.
scala> val m = Map(1 -> 2)
val m: Map[Int, Int] = Map(1 -> 2)
scala> m. <hit tab for method lookup>
!= Maximized contains
But not from Ammonite:
scala-cli repl -S 3.3.3 --amm --power
Welcome to the Ammonite Repl 3.0.0-M1-19-a7973e17 (Scala 3.3.3 Java 17.0.11)
@ val m = Map(1 -> 2)
m: Map[Int, Int] = Map(1 -> 2)
@ m.<hit tab for method lookup>
Exception in thread "main" java.lang.AssertionError: assertion failed: type error: Map[Int, Int] does not conform to scala.deriving.Mirror.ProductOf[T... (as above)
When using the . + tab gesture to look up methods on a Map[Int,Int] object from the Scala 3.3.3 shell, the action throws the error below and exits the Ammonite shell. Environment: Ubuntu 22.04 LTS with Amazon Corretto JDK 17.0.11. Works for lookups on
String
,Option[Int]
,List[Int]
(but also fails for Map[String,String]).Steps to replicate:
Works for the 2.13 version so maybe this is a Scala 3.3.3 problem?