Skip to content

Commit 93e422e

Browse files
authored
fix(jsii-pacmak): CS0108 <static property> hides inherited member (#4826)
C# requires that we explicitly declare when static members are changed in subclasses. In #2373 we added the ability to change the definition of static functions and static read/write properties in this way, but we missed doing the same for static `const` properties. Give them the same treatment. (PR includes #4827) --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
1 parent b0eb572 commit 93e422e

File tree

9 files changed

+297
-162
lines changed

9 files changed

+297
-162
lines changed

packages/jsii-calc/lib/compliance.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2924,6 +2924,8 @@ export namespace LevelOne {
29242924
* like.
29252925
*/
29262926
export class StaticHelloParent {
2927+
public static readonly PROPERTY: number = 1337;
2928+
29272929
public static get property(): number {
29282930
return 1337;
29292931
}
@@ -2933,6 +2935,8 @@ export class StaticHelloParent {
29332935
}
29342936
}
29352937
export class StaticHelloChild extends StaticHelloParent {
2938+
public static readonly PROPERTY: number = 42;
2939+
29362940
public static get property(): number {
29372941
return 42;
29382942
}

0 commit comments

Comments
 (0)