Skip to content

Java: method overloads are not generated (regression) #233

Closed

Description

@eladb

Oddly, method overloads are no longer generated (see CDK Bucket constructor, and Bucket.grantRead examples)

Activity

  1. added
    bug
    on Sep 17, 2018
  2. changed the title [-]Java: method overloads are not generated, at least for ctors (regression)[/-] [+]Java: method overloads are not generated (regression)[/+] on Sep 17, 2018
  3. added a commit that references this issue on Sep 17, 2018
  4. self-assigned this
    on Sep 17, 2018
  5. RomainMuller commented on Sep 17, 2018

    @RomainMuller
    Contributor

    Looking.

  6. RomainMuller commented on Sep 17, 2018

    @RomainMuller
    Contributor

    One thing I see already is that in the constructor of Bucket, props is not modelled as optional, despite it carries a default value. This is a bug in the jsii compiler. I am almost certain the issue for Bucket.grantRead is the same.

  7. rix0rrr commented on Sep 17, 2018

    @rix0rrr
    Contributor

    We should prohibit overloads at the jsii level anyway.

    Golang doesn't support them, for example.

  8. rix0rrr commented on Sep 17, 2018

    @rix0rrr
    Contributor

    Nor Rust, should we ever want to target that.

  9. RomainMuller commented on Sep 17, 2018

    @RomainMuller
    Contributor

    They're not really overrides per the model... We're making overrides without the trailing optional arguments to make Javaists' lives nicer.

  10. eladb commented on Sep 17, 2018

    @eladb
    ContributorAuthor

    Exactly. So languages that do not support them can only generate the method and allow nulls to be passed for optional arguments

  11. added 2 commits that reference this issue on Sep 17, 2018
    29ed0b1
    8208b67
  12. rix0rrr commented on Sep 17, 2018

    @rix0rrr
    Contributor

    Oh I see, overloads as an implementation mechanism. That's fine.

  13. added a commit that references this issue on Sep 17, 2018
    578bf9c
  14. added a commit that references this issue on Sep 20, 2018
    eaa4dba
  15. added 3 commits that reference this issue on Sep 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions