Return value of method not declared

CachéQuality release 
1.0.0
Id 
OS0038
Rule type 
Severity 

Critical

Critical
SQALE characteristic 
  • Reliability
    • Instruction
Tags 
probable-bug
Remediation function 
Constant/issue
Remediation cost 
10min

ObjectScript allows to write methods which return a value but do not declare it, as in:

    Method m()
    {
        return 1
    }

While it is possible, it is not recommended; methods should always declare their return type, as in:

    Method m() As %Integer
    {
        return 1
    }