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
$ scala-cli -S3.nightly
DownloadingScala3.4.0-RC1-bin-20231201-d96e9e4-NIGHTLY compiler
Welcome to Scala3.4.0-RC1-bin-20231201-d96e9e4-NIGHTLY-git-d96e9e4 (17.0.8.1, JavaOpenJDK64-BitServerVM).
Type in expressions for evaluation. Ortry:help.
scala> extension (s: String)
|defo= s +"o"|defoo= s +"oo"|valo="o"|valoo="oo"Exception in thread "main" java.lang.IllegalArgumentException: wrong number of arguments
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at dotty.tools.repl.Rendering.$anonfun$4(Rendering.scala:110)
at scala.Option.flatMap(Option.scala:283)
at dotty.tools.repl.Rendering.valueOf(Rendering.scala:110)
at dotty.tools.repl.Rendering.renderVal(Rendering.scala:152)
at dotty.tools.repl.ReplDriver.$anonfun$7(ReplDriver.scala:390)
at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
at scala.collection.immutable.List.foreach(List.scala:333)
Expectation
The compiler should not crash. The code should work just as in:
$ scala-cli -S3.nightly
Welcome to Scala3.4.0-RC1-bin-20231201-d96e9e4-NIGHTLY-git-d96e9e4 (17.0.8.1, JavaOpenJDK64-BitServerVM).
Type in expressions for evaluation. Ortry:help.
scala> extension (s: String)
|defoo= s +"oo"|valoo="oo"defoo(s: String):Stringvaloo:String= oo
The text was updated successfully, but these errors were encountered:
valueOf should only consider getters, which have 0 parameters.
test with:
scala3-compiler / testOnly dotty.tools.repl.ScriptedTests -- dotty.tools.repl.ScriptedTests.replTests
Fixesscala#19184
`valueOf` should only consider getters, which have 0 parameters.
test with:
```
scala3-compiler / testOnly dotty.tools.repl.ScriptedTests -- dotty.tools.repl.ScriptedTests.replTests
```
Fixes#19184
[Cherry-picked 4828244]
`valueOf` should only consider getters, which have 0 parameters.
test with:
```
scala3-compiler / testOnly dotty.tools.repl.ScriptedTests -- dotty.tools.repl.ScriptedTests.replTests
```
Fixes#19184
[Cherry-picked 4828244]
Compiler version
3.3.1 and 3.4.0-RC1-bin-20231201-d96e9e4-NIGHTLY
Minimized code + Output
Expectation
The compiler should not crash. The code should work just as in:
The text was updated successfully, but these errors were encountered: