GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — LambdaExpr doesn't support void-typed return expressions · Issue #843 · googleapis/sdk-platform-java

This repository was archived by the owner on Oct 29, 2026. It is now read-only.
This repository was archived by the owner on Oct 29, 2026. It is now read-only.

LambdaExpr doesn't support void-typed return expressions #843

Copy link
Copy link
Closed
Closed
LambdaExpr doesn't support void-typed return expressions#843
Copy link
Assignees
diegomarquezp
Labels
priority: p3Desirable enhancement or fix. May not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Description

@chanseokoh
chanseokoh
opened on Sep 14, 2021
Issue body actions

https://github.com/googleapis/gapic-generator-java/blob/92f7c1cf7b343947a64943fd7ee7ffb4d67a9d5a/src/main/java/com/google/api/generator/engine/ast/LambdaExpr.java#L72-L74

LambdaExpr requires a ReturnExpr to be set. And LambdaExpr.build() explicitly forbids void-typed return expressions. So it's not possible to create a lambda like this:

    Runnable r1 = () -> System.out.println();
    Runnable r2 = () -> {
      System.out.println();
    };
    Runnable r3 = System.out::println;

Activity

  1. chanseokoh
    added
    priority: p2Moderately-important priority. Fix may not be included in next release.
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    on Sep 14, 2021
  2. yoshi-automation
    added
    🚨This issue needs some love.
    and removed
    🚨This issue needs some love.
    on Dec 13, 2021
  3. yoshi-automation
    added
    🚨This issue needs some love.
    on Mar 13, 2022
  4. vchudnov-g
    assigned
    vam-google
    on Mar 15, 2022
  5. meltsufin
    added
    priority: p3Desirable enhancement or fix. May not be included in next release.
    and removed
    priority: p2Moderately-important priority. Fix may not be included in next release.
    on Mar 16, 2022
  6. yoshi-automation
    removed
    🚨This issue needs some love.
    on Mar 16, 2022
  7. blakeli0
    unassigned
    vam-google
    on Jul 20, 2022
  8. blakeli0
    assigned
    diegomarquezp
    on Aug 2, 2022
  9. diegomarquezp
    added a commit that references this issue on Aug 2, 2022

    fix(ast): removed lambda void return type check (#1019)

    317eff6
  10. diegomarquezp
    closed this as completedon Aug 2, 2022
  11. suztomo
    added a commit that references this issue on Dec 16, 2022

    fix(ast): removed lambda void return type check (#1019)

    9d792bc
  12. suztomo
    added 4 commits that reference this issue on Mar 21, 2023

    deps: update dependency importlib-metadata to v4.13.0 (#843)

    333b61b

    chore(main): release 3.0.4 (#850)

    cf70e07

    deps: update dependency com.google.api-client:google-api-client-bom t…

    d81fbf0

    chore(main): release 2.8.0 (#837)

    90b7680
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @diegomarquezp
    diegomarquezp

Labels

priority: p3Desirable enhancement or fix. May not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.