-
Notifications
You must be signed in to change notification settings - Fork 246
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(rosetta): constants are incorrectly turned into getters
Enum and public static const accesses are turned into getters, which they shouldn't be. Related #2984.
- Loading branch information
Showing
11 changed files
with
83 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/jsii-rosetta/test/translations/expressions/enum_access.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Console.WriteLine(EnumType.ENUM_VALUE_A); |
1 change: 1 addition & 0 deletions
1
packages/jsii-rosetta/test/translations/expressions/enum_access.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
System.out.println(EnumType.ENUM_VALUE_A); |
1 change: 1 addition & 0 deletions
1
packages/jsii-rosetta/test/translations/expressions/enum_access.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
print(EnumType.ENUM_VALUE_A) |
7 changes: 7 additions & 0 deletions
7
packages/jsii-rosetta/test/translations/expressions/enum_access.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/// !hide | ||
enum EnumType { | ||
ENUM_VALUE_A = 'a', | ||
ENUM_VALUE_B = 'b', | ||
} | ||
/// !show | ||
console.log(EnumType.ENUM_VALUE_A); |
1 change: 1 addition & 0 deletions
1
packages/jsii-rosetta/test/translations/expressions/enum_like_access.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Console.WriteLine(EnumType.ENUM_VALUE_A); |
1 change: 1 addition & 0 deletions
1
packages/jsii-rosetta/test/translations/expressions/enum_like_access.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
System.out.println(EnumType.ENUM_VALUE_A); |
1 change: 1 addition & 0 deletions
1
packages/jsii-rosetta/test/translations/expressions/enum_like_access.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
print(EnumType.ENUM_VALUE_A) |
7 changes: 7 additions & 0 deletions
7
packages/jsii-rosetta/test/translations/expressions/enum_like_access.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/// !hide | ||
class EnumType { | ||
public static readonly ENUM_VALUE_A = 'a'; | ||
public static readonly ENUM_VALUE_B = 'b'; | ||
} | ||
/// !show | ||
console.log(EnumType.ENUM_VALUE_A); |