Method lack return type

objectscriptQuality release 
1.3.0
Id 
OS0084
Rule type 
Code Smell
Severity 

Major

Major
SQALE characteristic 
  • Reliability
    • Instruction
Tags 
coding-guidelines, probable-bug
Remediation function 
Constant/issue
Remediation cost 
1h

Method is used in expression but has no ReturnType in definition.

Noncompliant Code Example

ClassMethod foo()
{
    Quit "1"
}

ClassMethod bar()
{
    #Dim str As %String = ..foo()
    Write !,str
}

Compliant Solution

ClassMethod foo() As %String
{
    Quit "1"
}

ClassMethod bar()
{
    #Dim str As %String = ..foo()
    Write !,str
}