Skip to content

IDL Problem Code 96 with alias ptr-de-ref-ambiguity

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

Execution Error

This is a fatal error that prevents IDL from compiling or running code

This problem, using types, identifies when you are de-referencing a variable that is a pointer and one other type.

For example, we can reproduce this with a union type of a pointer and a string in a routine definition.

Here is a reproduce case:

idl
;+
; :Arguments:
;   arg: in, required, Pointer<any> | String
;     Test arg
;
;-
pro mypro, arg
  compile_opt idl2
  b = *arg
  ;   ^^^^ ambiguous pointer de-ref
end

To fix, make the types more concise:

idl
;+
; :Arguments:
;   arg: in, required, Pointer<any>\
;     Test arg
;
;-
pro mypro, arg
  compile_opt idl2
  b = *arg
  ;   ^^^^ OK!
end

Licensed under MIT.