[Oberon] ABSTRACT to EMPTY redefinition in Component Pascal

Diego Sardina dsar at eml.cc
Tue Apr 10 22:49:49 CEST 2018


Dear Oberon community,

I found an unusual feature while playing a bit with Component Pascal.

The report says: "A method redefined by an empty method must be empty or abstract."

This sentence means that in later extensions an abstract method can be redefined as an optional/empty.

Are there any use-cases for this?


MODULE M;

  TYPE
      T = ABSTRACT RECORD END;
      T1 = ABSTRACT RECORD (T) END;

  PROCEDURE (VAR t: T) P(), NEW, ABSTRACT;

  PROCEDURE (VAR t: T1) P(), EMPTY;

END M.

-- 
Diego Sardina


More information about the Oberon mailing list