-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
REPL crashes on code completion for a subtype of Selectable
#16360
Comments
What happened:
Not sure which of these 4 elements was not present in 3.2.0. |
Just in case anyone else runs into this: the linked PR also fixes a similar autocompletion error with chained implicits. Here's an example that worked in 3.2.0, crashes in 3.2.1 and works again in main since #16371 was merged: class A
class B(a: A)
class C(b: B) { def foo = 42 }
implicit def toB(a: A): B = new B(a)
implicit def toCViaAdditionalImplicit(a: A)(implicit convertToB: A => B): C = new C(convertToB(a))
val a = new A
a.foo // 42
a.<tab> //Exception in thread "main" java.lang.AssertionError: assertion failed: missing implicit parameter of type A => B after typer at phase parser Thanks for reporting and fixing! |
* those lead to trouble with autocompletion in Scala 3.2.1 * will be fixed in 3.2.2 - see scala/scala3#16360 (comment)
* comment out chained implicits temporarily * those lead to trouble with autocompletion in Scala 3.2.1 * will be fixed in 3.2.2 - see scala/scala3#16360 (comment) * make chained implicits available via explicit import
* also triggers autocompletion bug in repl * will be fixed in 3.2.2 - see scala/scala3#16360 (comment) * just like 74b874b
* also triggers autocompletion bug in repl * will be fixed in 3.2.2 - see scala/scala3#16360 (comment) * just like 74b874b
* also triggers autocompletion bug in repl * will be fixed in 3.2.2 - see scala/scala3#16360 (comment) * just like 74b874b
I was trying the following example from Dean's book with Scala 3.2.1 (I pressed
Looking forward to the release of 3.2.2 where the bug is fixed. Thanks |
@tedyu your problem is already fixed in 3.2.2-RC2 |
Compiler version
Crashes in 3.2.1 and nightly (3.3.0-RC1-bin-20221115-e587a81-NIGHTLY)
There was no crash in 3.2.0
Minimized code
Output (click arrow to expand)
The text was updated successfully, but these errors were encountered: