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

Recursive code does not work in 3.5 #1093

Open
golangcyberdude opened this issue Aug 22, 2024 · 2 comments
Open

Recursive code does not work in 3.5 #1093

golangcyberdude opened this issue Aug 22, 2024 · 2 comments

Comments

@golangcyberdude
Copy link

golangcyberdude commented Aug 22, 2024

Describe the bug

Recursive code does not work in 3.5, works on 3.5.1 RC2 and 3.4.2. Also 3.3.3 LTS doesn't work.

Scastie snippet link

https://scastie.scala-lang.org/Uu01YEoZSGiNho2ApB7XRw

To Reproduce

Try this code in scastie in 3.4.2, 3.5 and 3.5.1 RC2

def recurseOnList(fields: List[String]): List[String] =
  if fields.isEmpty then
    println(fields)
    return fields
  println("xx" + fields.head)
  recurseOnList(fields.drop(1))

recurseOnList(List("1", "2", "3", "4", "5"))

Expected behavior

Expected output
xx1
xx2
xx3
xx4
xx5
List()

Screenshot ( Optional )

No response

Version

Scastie website

What browsers are you seeing the problem on?

Chrome

Relevant log output

No response

@rochala
Copy link
Collaborator

rochala commented Aug 26, 2024

Hey, firstly, thanks for reporting the issue.

It seems like this issue is no longer reproducible and everything is working as intended.
Can you check once again and confirm that this is the case ?

Other than that, the issue may have been in the load balancer or some other place.

@golangcyberdude
Copy link
Author

Fixed! All working now. Thanks.

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

2 participants