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

Suspend lambda incorrectly rewrites return type #60

Closed
nomisRev opened this issue Apr 3, 2023 · 1 comment · Fixed by #62
Closed

Suspend lambda incorrectly rewrites return type #60

nomisRev opened this issue Apr 3, 2023 · 1 comment · Fixed by #62
Labels
bug Something isn't working

Comments

@nomisRev
Copy link
Contributor

nomisRev commented Apr 3, 2023

When using the special syntax for suspend lambdas without arguments suspend { } , the return type is incorrectly changed.

fun method ( ) {
    val lambda: suspend ( ) -> Int = suspend { 1 }
}

Results in:

expected: 
  "fun method ( ) {
      val lambda: suspend ( ) -> Int = suspend { 1 }
  }"
 but was: 
  "fun method ( ) {
      val lambda:  Int = suspend { 1 }
  }"
@traceyyoshima
Copy link
Contributor

fixed by 7c4cdcb

@github-project-automation github-project-automation bot moved this from Backlog to Done in OpenRewrite Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants