MSIR.0787 Result has incorrect type: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
(Automatically generated page update)
Line 3: Line 3:
<ul> <li>The method has an <tt>Object</tt> datatype and the <tt>return</tt> value doesn't. <li>The <tt>return</tt> has an object datatype and the method doesn't. <li>They both have object datatypes, but the object classes are different.</ul> Simple datatypes are automatically converted if the <tt>Return</tt> datatype doesn't match the method datatype. Correct either the <tt>Return</tt> statement, or the <tt>Function</tt> or <tt>Property</tt> definition.
<ul> <li>The method has an <tt>Object</tt> datatype and the <tt>return</tt> value doesn't. <li>The <tt>return</tt> has an object datatype and the method doesn't. <li>They both have object datatypes, but the object classes are different.</ul> Simple datatypes are automatically converted if the <tt>Return</tt> datatype doesn't match the method datatype. Correct either the <tt>Return</tt> statement, or the <tt>Function</tt> or <tt>Property</tt> definition.


[[Category:Sirius Mods Messages]]
[[Category:Sirius Mods messages]]

Revision as of 17:59, 19 April 2013

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.