Skip to content

IDL Problem Code 81 with alias class-no-params

Want to disable me? Check out the configuration guide to learn more.

Best Practice

While this is not a syntax error, the procedures that contain structure definitions shouldn't have any arguments or

This problem detects when a class definitions routine (procedures that end with __define) have arguments or keywords.

While this is not a syntax error, the procedures that contain structure definitions shouldn't have any parameters.

This is because, when IDL resolves structure definitions from the search path, the procedure is called by itself.

Here's an example of this problem:

idl
pro MyClass__define, arg1, arg2, kw1 = kw1
  ;                  ^^^^^^^^^^^^^^^^^^^^^ no parameters
  compile_opt idl2
end

Which can be resolved by removing the parameters:

idl
pro MyClass__define
  ;                ^^^^ OK!
  compile_opt idl2
end

Licensed under MIT.