Commit 43ffcff
authored
Because `IAlias` extends `IKey`, `IAlias` inherits the new `keyRef: KeyReference`.
It was originally implemented by referencing the underlying key, but that's wrong: it should reference the alias itself, but using the field names it shares with `IKey`.
In fact, we should have introduced a new interface like `IKeyLike` to do this job, but instead we overloaded `IKey` to behave like a hypothetical `IKeyLike`, and `IKeyRef` now inherits this double duty.
Therefore, we now make the `IKeyRef` implementation of `Alias` behave like a `IKeyLikeRef`, and satisfy the contract using its own fields.
Closes #35543
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 44781ef commit 43ffcff
File tree
3 files changed
+23
-1
lines changed- packages/aws-cdk-lib/aws-kms
- lib
- test
3 files changed
+23
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
73 | 79 | | |
74 | 80 | | |
75 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
911 | 911 | | |
912 | 912 | | |
913 | 913 | | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
914 | 927 | | |
915 | 928 | | |
916 | 929 | | |
| |||
0 commit comments