ascot diagnostics

A6442

Error: Method ‘{name}’ has the name of a label in include file ‘{include}’, which IRIS refuses (<LABELREDEF>)

A method has the name of a label in an include file that the class or a superclass Includes, or that such a file #includes. IRIS compiles a class’s methods into one routine with the lines of its include files, each method under a label of its name. The method’s label redefines the include file’s label, and IRIS refuses to compile the class (<LABELREDEF>). Rename the method, or the label.

IRIS rejects the example.

ROUTINE Demo.Formatting [Type=INC]
Pad(text, width) {
    Quit $Justify(text, width)
}
Version
    Quit "1.0"
Include Demo.Formatting

Class Demo.Report Extends %RegisteredObject
{

ClassMethod Pad(text As %String) As %String //! A6442
{
    Quit $Justify(text, 10)
}

ClassMethod Version() As %String //! A6442
{
    Quit "2.0"
}

}

All diagnostics