MODULE Test;

TYPE
  T* = RECORD END ;
  T1* = RECORD (T) END ;
  T2* = RECORD (T) END ;
  T3* = RECORD (T) END ;
  T4* = RECORD (T) END ;
  T5* = RECORD (T) END ;

PROCEDURE (VAR t: T) M* (i: INTEGER; VAR j: INTEGER);
BEGIN j := i
END M;

PROCEDURE (VAR t: T1) M* (i: INTEGER; VAR j: INTEGER);  (* use i, (may) define j *)
BEGIN
  IF i = 0 THEN j := 0 END
END M;

PROCEDURE (VAR t: T2) M* (i: INTEGER; VAR j: INTEGER);  (* use i, always define j *)
BEGIN
  j := i
END M;

PROCEDURE (VAR t: T3) M* (i: INTEGER; VAR j: INTEGER);  (* use i, use j *)
BEGIN
  IF i = j THEN END
END M;

PROCEDURE (VAR t: T4) M* (i: INTEGER; VAR j: INTEGER);  (* may define j *)
  VAR k: INTEGER;
BEGIN
  IF k = 0 THEN j := 1 END
END M;

PROCEDURE (VAR t: T5) M* (i: INTEGER; VAR j: INTEGER);  (* use j *)
BEGIN
  IF j = 0 THEN END
END M;

PROCEDURE Do*;
  VAR t: T;

  PROCEDURE Call (VAR t: T);
    VAR i, j: INTEGER;
  BEGIN
    i := 1; j := 1;
    t.M(i, j);
    i := i;
    j := j
  END Call;
BEGIN
  Call(t)
END Do;

END Test.