Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disambiguate type names in cluster-objects initializers.
In most places, where we are assigning to something of type {{zapTypeToDecodableClusterObjectType type}} to start with, what we had was not a problem. But in the DecodableType for the cluster-wide struct, which is inside namespace chip::app::Clusters::ClusterName::Attributes, we could get an ambiguity when an attribute and an enum had the same name (e.g. HourFormat). Then the bareword HourFormat instead of being treated as ClusterName::HourFormat would get treated as ClusterName::Attributes::HourFormat, which is a namespace, not a type name, and after that things would fail to compile. The fix is to, at this one callsite, pass in the cluster name as the namespace, so we generate fully qualified names for enums.
- Loading branch information