Skip to content

Commit

Permalink
chore: fix C# build (#31946)
Browse files Browse the repository at this point in the history
Currently, the generated C# code doesn't compile with this error:

```
error CS0115: 'VpcV2Base._Proxy.Ipv4IpamProvisionedCidrs': no suitable method found to override
```

The reason is that the abstract base class that implements an interface doesn't have an abstract field for that interface. 

Then when a subclass does implement it, it gets rendered to an `override` in C#, but there is no method to override.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
rix0rrr authored Oct 30, 2024
1 parent dae415e commit 3818234
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/@aws-cdk/aws-ec2-alpha/lib/vpc-v2-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,13 @@ export abstract class VpcV2Base extends Resource implements IVpcV2 {
*/
public abstract readonly ownerAccountId: string;

/**
* IPv4 CIDR provisioned under pool
* Required to check for overlapping CIDRs after provisioning
* is complete under IPAM pool
*/
public abstract readonly ipv4IpamProvisionedCidrs?: string[];

/**
* If this is set to true, don't error out on trying to select subnets
*/
Expand Down

0 comments on commit 3818234

Please sign in to comment.