MSIR.0787 Result has incorrect type: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Created page with "A <tt>return</tt> statement was coded in a <tt>Function</tt> or the <tt>Get</tt> method of a <tt>property</tt>, but the datatype of the expression that follows the <tt>return</tt...")
 
m (1 revision)
(No difference)

Revision as of 16:45, 9 November 2010

A return statement was coded in a Function or the Get method of a property, but the datatype of the expression that follows the return is incorrect. This can occur in these situations:

  • The method has an Object datatype and the return value doesn't.
  • The return has an object datatype and the method doesn't.
  • They both have object datatypes, but the object classes are different.

Simple datatypes are automatically converted if the Return datatype doesn't match the method datatype. Correct either the Return statement, or the Function or Property definition.