So any ideas how the compiler could add diagnostics, or fix the issue by other means? Currently we have 2 non-practical suggestions in this thread:
-
Make
KeyPathonly usable fordynamickeypaths - would break a lot of current use cases, asKeyPathis helpful in other contexts for non-dynamickeypaths as well -
Add new subtypes to
KeyPathandWritableKeyPaththat guarantee that all path elements aredynamic(and maybe@objctoo) - problematic as we need to add 2 subtypes which is overcomplicating the existingKeyPathclass hierarchy
Any other ideas?