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

Possible error with go runtime type checking #3856

Closed
jsteinich opened this issue Nov 26, 2022 · 3 comments
Closed

Possible error with go runtime type checking #3856

jsteinich opened this issue Nov 26, 2022 · 3 comments
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.

Comments

@jsteinich
Copy link
Contributor

Describe the bug

User received panic error when passing *[]*string to a function that takes *[]interface{}, IResolvable. In Typescript it would be passing string[] to any[] | IResolvable parameter.

Expected Behavior

No error and argument passed successfully.

Current Behavior

panic: parameter list must be one of the allowed types: *[]interface{}, IResolvable; received &[]*string{(*string)(0x1400036b670)} (a *[]*string)

Reproduction Steps

  1. Create a method with a any[] | IResolvable parameter.
  2. Create jsii go bindings
  3. Attempt to call the method with a *[]*string argument

Possible Solution

Possibly caused by #3712

Additional Information/Context

Issue didn't exist on jsii version 1.62.
Full report here: hashicorp/terraform-cdk#2281

SDK version used

1.68

Environment details (OS name and version, etc.)

using go within cdktf

@jsteinich jsteinich added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Nov 26, 2022
@RomainMuller
Copy link
Contributor

This is duplicated by #3948

@RomainMuller
Copy link
Contributor

I'll close this in favor of the other issue because it has more examples in there, but these two reports are effectively identical.

@github-actions
Copy link
Contributor

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

2 participants