CA006 - Object test typing not needed


In an object test if the expression conforms to the specified type, that type is redundant.

Scope feature
Status Enabled
Severity Suggestion
Applicability All
Score 40

Example of violation

s: STRING_32 ... if attached {READABLE_STRING_GENERAL} s as l_s then l_s.do_something end


Remove the specified type in the object test.

In the example, it can simply be: if attached s as l_sl then l_s.do_something end

cached: 07/14/2024 3:39:29.000 PM