MSIR.0787 Result has incorrect type: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Automatically generated page update)
(Automatically generated page update)
Line 1: Line 1:
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> is incorrect. This can occur in these situations:
A <tt>return</tt> statement was coded in a <tt>Function</tt> or the <var>Get</var> method of a <tt>property</tt>, but the datatype of the expression that follows the <tt>return</tt> is incorrect. This can occur in these situations:


<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 18:44, 23 April 2014

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.