Skip to content
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 is spoiled after tab completion #19173

Closed
punzik opened this issue Dec 3, 2023 · 4 comments
Closed

REPL is spoiled after tab completion #19173

punzik opened this issue Dec 3, 2023 · 4 comments

Comments

@punzik
Copy link

punzik commented Dec 3, 2023

Compiler version

Scala 3.3.1 (19.0.2, Java OpenJDK 64-Bit Server VM).

Repl log

Welcome to Scala 3.3.1 (19.0.2, Java OpenJDK 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.
                                                                                                                                        
scala> val a = (1, 2, 3)
val a: (Int, Int, Int) = (1,2,3)
                                                                                                                                        
scala> a.toList.map(_ + 1)
val res0: List[Int] = List(2, 3, 4)
                                                                                                                                        
scala> a.toList.map(_ + 1)
val res1: List[Int] = List(2, 3, 4)
                                                                                                                                        
scala> a.toList.map(_ + 1)
Bad symbolic reference. A signature
refers to JFunction1$mcII$sp/T in package scala.runtime.java8 which is not available.
It may be completely missing from the current classpath, or the version on
the classpath might be incompatible with the version used when compiling the signature.
1 error found

The first call a.toList.map is taken from the repl history (from the previous run), the second call is hand-typed, on the third call toList is taken from the Tab autocomplete. After the third call the map function stops working on any lists.

One of the first calls of 'a.toList.map` can be omitted, it breaks after autocomplete anyway.

Expectation

The same result is expected as when the first two commands are called.

@punzik punzik added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label labels Dec 3, 2023
@hamzaremmal hamzaremmal added area:repl and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels Dec 3, 2023
@SethTisue
Copy link
Member

Offhand, looks like it could be simply a duplicate of #15562. Do you agree?

@punzik
Copy link
Author

punzik commented Dec 20, 2023

Looks like the reason is the same. But I wouldn't say it's a duplicate. I'd rather say it's a clarification.

@SethTisue
Copy link
Member

@punzik if you feel there's helpful non-duplicate information in this ticket, please leave it as a comment on the other ticket

@SethTisue SethTisue closed this as not planned Won't fix, can't repro, duplicate, stale Dec 21, 2023
@som-snytt
Copy link
Contributor

stat:clarification

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants