catch matlab constructs that will fail code generation early on
specifically, Code generation only supports initial values of class type for constant properties
Your MATLAB/Octave environment
MATLAB R2017b
MISS_HIT component affected
Choose one or more of the below:
mh_lint
Describe the solution you'd like
in classes, properties may be initialized in the properties block itself, e.g.
properties
cats = uint8(6)
end
However, code generation only supports this for assignments that use only build-ins. So custom class constructors / functions won't work, e.g.
properties
cat = Cat() % Cat being a custom class
end
This is fine when you don't generate code from is but will cause an error during code generation "Code generation only supports initial values of class type for constant properties". It'd be nice if this was caught by miss_hit early on.
What kind of feature is this?
Your MATLAB/Octave environment
MISS_HIT component affected Choose one or more of the below:
Describe the solution you'd like in classes, properties may be initialized in the properties block itself, e.g.
However, code generation only supports this for assignments that use only build-ins. So custom class constructors / functions won't work, e.g.
This is fine when you don't generate code from is but will cause an error during code generation "Code generation only supports initial values of class type for constant properties". It'd be nice if this was caught by miss_hit early on.