Skip to content

Conversation

@dwijnand
Copy link
Member

No description provided.

@dwijnand dwijnand linked an issue Sep 23, 2021 that may be closed by this pull request
@dwijnand dwijnand marked this pull request as ready for review September 23, 2021 20:05
@dwijnand dwijnand requested a review from smarter September 23, 2021 20:05
@SethTisue
Copy link
Member

@dwijnand looks like the pattern handling only works because we special-cased tuples:

scala> val Some((res0, res1)) = Option((1, "foo"))
val res0: Int = 1
val res1: String = foo
                                                                                                                        
scala> res0
-- [E045] Cyclic Error: --------------------------------------------------------
1 |res0
  |^
  |Recursive value res0 needs type

longer explanation available when compiling with `-explain`
1 error found

Co-authored-by: Seth Tisue <seth@tisue.net>
@dwijnand dwijnand merged commit 1c3d9ba into scala:master Sep 27, 2021
@dwijnand dwijnand deleted the repl-res-usage branch September 27, 2021 10:19
@Kordyjan Kordyjan added this to the 3.1.1 milestone Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Using identifiers starting with "res" in the REPL can lead to issues

4 participants