Fix KeyedService.AnyKey support #245
Conversation
|
Hmm, I keep staring at the code, but I'm having trouble groking what's actually changed here. Why is the string equality check not enough? I see the cast probably should be pulled out as a pattern cast and only run the string equality check if the key is actually a string, but I'm having trouble seeing why the reference equality check is necessary. Is it an optimization? To catch nulls? |
|
Ah, after looking at the test (thanks for including it ❤️) I get it. There's a Can we maybe include a comment to point out why those checks are there? 😄 |
|
@khellang While adding a comment, I found that |
DecorationExceptionis thrown if a non-keyed service and a keyed service are registered.I think this is a bug since 5.0.3
This PR fix
Decoratenot to try decorate keyed service