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

I am trying to use dotty with cdk java classes and I am getting these errors. #13046

Closed
mvillafuertem opened this issue Jul 11, 2021 · 0 comments · Fixed by #13048
Closed

I am trying to use dotty with cdk java classes and I am getting these errors. #13046

mvillafuertem opened this issue Jul 11, 2021 · 0 comments · Fixed by #13048
Milestone

Comments

@mvillafuertem
Copy link

Hi there, I am translate this example to scala, this works perfectly with scala version 2.13.6, but with scala 3 I am getting these errors.

https://github.com/hashicorp/terraform-cdk/tree/main/examples/java/aws

Compiler version

3.0.1

Output (click arrow to expand)

[info] compiling 4 Scala sources and 7581 Java sources to /projects/scala/modules/hashicorp/terraform-cdktf-scala/target/scala-3.0.1/classes ...
[error] -- Error: /projects/scala/modules/hashicorp/terraform-cdktf-scala/src/main/java/imports/aws/AutoscalingGroupMixedInstancesPolicyLaunchTemplate.java:35:103 
[error] 35 |        private java.util.List<imports.aws.AutoscalingGroupMixedInstancesPolicyLaunchTemplateOverride> override;
[error]    |                                                                                                       ^^^^^^^^
[error]    |                                 identifier expected but override found.
[error] -- Error: /projects/scala/modules/hashicorp/terraform-cdktf-scala/src/main/java/imports/aws/AutoscalingGroupMixedInstancesPolicyLaunchTemplate.java:56:23 
[error] 56 |        public Builder override(java.util.List<? extends imports.aws.AutoscalingGroupMixedInstancesPolicyLaunchTemplateOverride> override) {
[error]    |                       ^^^^^^^^
[error]    |                       identifier expected but override found.
[error] -- Error: /projects/scala/modules/hashicorp/terraform-cdktf-scala/src/main/java/imports/aws/AutoscalingGroupMixedInstancesPolicyLaunchTemplate.java:70:4 
[error] 70 |    }
[error]    |    ^
[error]    |    ';' expected but '}' found.
[error] 71 |    /**
[error] 72 |
[error] -- Error: /projects/scala/modules/hashicorp/terraform-cdktf-scala/src/main/java/imports/aws/AutoscalingGroupMixedInstancesPolicyLaunchTemplate.java:78:109 
[error] 78 |        private final java.util.List<imports.aws.AutoscalingGroupMixedInstancesPolicyLaunchTemplateOverride> override;
[error]    |                                                                                                             ^^^^^^^^
[error]    |                                 identifier expected but override found.
[error] -- Error: /projects/scala/modules/hashicorp/terraform-cdktf-scala/src/main/java/imports/aws/AutoscalingGroupMixedInstancesPolicyLaunchTemplate.java:94:283 
[error] 94 |        protected Jsii$Proxy(final java.util.List<? extends imports.aws.AutoscalingGroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecification> launchTemplateSpecification, final java.util.List<? extends imports.aws.AutoscalingGroupMixedInstancesPolicyLaunchTemplateOverride> override) {
[error]    |                                                                                                                                                                                                                                                                                           ^^^^^^^^
[error]    |                                 identifier expected but override found.
[error] -- Error: /projects/scala/modules/hashicorp/terraform-cdktf-scala/src/main/java/imports/aws/AutoscalingGroupMixedInstancesPolicyLaunchTemplate.java:148:4 
[error] 148 |    }
[error]     |    ^
[error]     |    ')' expected but '}' found.
[error] 149 |}
[error] -- Error: /projects/scala/modules/hashicorp/terraform-cdktf-scala/src/main/java/imports/aws/Ec2FleetLaunchTemplateConfig.java:35:81 
[error] 35 |        private java.util.List<imports.aws.Ec2FleetLaunchTemplateConfigOverride> override;
[error]    |                                                                                 ^^^^^^^^
[error]    |                                 identifier expected but override found.
[error] -- Error: /projects/scala/modules/hashicorp/terraform-cdktf-scala/src/main/java/imports/aws/Ec2FleetLaunchTemplateConfig.java:56:23 
[error] 56 |        public Builder override(java.util.List<? extends imports.aws.Ec2FleetLaunchTemplateConfigOverride> override) {
[error]    |                       ^^^^^^^^
[error]    |                       identifier expected but override found.
[error] -- Error: /projects/scala/modules/hashicorp/terraform-cdktf-scala/src/main/java/imports/aws/Ec2FleetLaunchTemplateConfig.java:70:4 
[error] 70 |    }
[error]    |    ^
[error]    |    ';' expected but '}' found.
[error] 71 |    /**
[error] 72 |
[error] -- Error: /projects/scala/modules/hashicorp/terraform-cdktf-scala/src/main/java/imports/aws/Ec2FleetLaunchTemplateConfig.java:78:87 
[error] 78 |        private final java.util.List<imports.aws.Ec2FleetLaunchTemplateConfigOverride> override;
[error]    |                                                                                       ^^^^^^^^
[error]    |                                 identifier expected but override found.
[error] -- Error: /projects/scala/modules/hashicorp/terraform-cdktf-scala/src/main/java/imports/aws/Ec2FleetLaunchTemplateConfig.java:94:239 
[error] 94 |        protected Jsii$Proxy(final java.util.List<? extends imports.aws.Ec2FleetLaunchTemplateConfigLaunchTemplateSpecification> launchTemplateSpecification, final java.util.List<? extends imports.aws.Ec2FleetLaunchTemplateConfigOverride> override) {
[error]    |                                                                                                                                                                                                                                               ^^^^^^^^
[error]    |                                 identifier expected but override found.
[error] -- Error: /projects/scala/modules/hashicorp/terraform-cdktf-scala/src/main/java/imports/aws/Ec2FleetLaunchTemplateConfig.java:148:4 
[error] 148 |    }
[error]     |    ^
[error]     |    ')' expected but '}' found.
[error] 149 |}
smarter added a commit that referenced this issue Jul 11, 2021
Fix #13046: `override` is a valid identifier in Java, not a keyword
@Kordyjan Kordyjan added this to the 3.0.2 milestone Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants