Method not found
objectscriptQuality release
Id
OS0080
Rule type
Bug
Severity
Critical
Critical
SQALE characteristic
- Reliability
- Instruction
Remediation function
Constant/issue
Remediation cost
1h
Declare the method you need to invoke for the class, or remove the reference to the undefined method.
Noncompliant Code Example
Following code will compile, but on runtime the IsTest
method will fail with "METHOD DOES NOT EXIST error" message.
Class Sample.NightWatch Extends %RegisteredObject { Property name As %String; Property surname As %String; Property age As %Integer; ClassMethod FullName() { Write !,..name_" "_..surname } } ... Set obj = ##class(Sample.Person).%New() Set obj.name = "Jon" Set obj.surname = "Snow" Do obj.LeaveTheWatch() // METHOD DOES NOT EXIST