Skip to content

[pigeon] Windows C++ generator doesn't handle optional arguments correctly #105164

Closed
flutter/packages
#2270

Description

@stuartmorgan-g

For instance void foo(String? bar);, which is currently translated to a std::optional<std::string> bar argument, generates the following decoding:

std::optional<std::string> foo_arg =
  std::any_cast<std::optional<std::string>>(
    std::get<flutter::CustomEncodableValue>(
      encodable_foo_arg));

But encodable_foo_arg is a null encodable value here, so this throws on null. (And strings shouldn't be trying to use CustomEncodableValue in the first place; this probably throws on non-null too.)

Activity

  1. added
    platform-windowsBuilding on or for Windows specifically
    p: pigeonrelated to pigeon messaging codegen tool
    P1High-priority issues at the top of the work list
    on Jun 1, 2022
  2. changed the title [-][pigeon] Windows C++ generator doesn't handler optional arguments correctly[/-] [+][pigeon] Windows C++ generator doesn't handle optional arguments correctly[/+] on Sep 20, 2022
  3. github-actions commented on Mar 4, 2023

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  4. locked as resolved and limited conversation to collaborators on Mar 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P1High-priority issues at the top of the work listp: pigeonrelated to pigeon messaging codegen toolpackageflutter/packages repository. See also p: labels.platform-windowsBuilding on or for Windows specifically

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions