Spivoxity / obc-3

Oxford Oberon-2 compiler
38 stars 7 forks source link

Conrete subtypes of abstract records should implement all abstract methods #32

Closed Spivoxity closed 4 years ago

Spivoxity commented 4 years ago

Each subtype of an abstract record type must either implement all its abstract methods, or be declared abstract itself. The compiler should check this, instead of generating object code with undefined labels.

MODULE eAbsRec;

TYPE a = ABSTRACT RECORD END;
 b = RECORD (a) END;

ABSTRACT PROCEDURE (VAR self: a) m;

VAR r*: b;

END eAbsRec.
Spivoxity commented 4 years ago

Also, I need to check that instances of abstract record types are not declared or created.

Spivoxity commented 4 years ago

These and other semantic checks are in rel-3.1.2.