[Smart Watch] [API 12] After defining data types in a single frame, the system always prompts 'Structural typing is not supported' when calling
Problem Description
An object is defined using class in an ets file, but when it is called in other files, it always prompts 'Structural typing is not supported'.
Reason for the problem
The same object is defined in different files, and although the object structure is completely consistent, it does not belong to the same object. Therefore, when defining parameter types in methods, there may be parameter type inconsistency errors
Solution
Ensure that each object in the project is defined only once. If this object needs to be used, it is best to introduce the same ETS to ensure that the same object introduced in all files is consistent
Top comments (0)