gsdlab / clafer

Clafer is a lightweight modeling language
http://clafer.org
MIT License
45 stars 13 forks source link

Cannot inherit from a nested abstract clafer which itself has a superclafer #78

Closed mantkiew closed 8 years ago

mantkiew commented 9 years ago

This is a bug in implementation of issue #67.

For the following correct model:

abstract Object

abstract Person : Object
    abstract Hand : Object
    abstract Hook : Hand

CptHookHand : Person
    left : Hook
    right : Hand

CptHandHook : Person
    left : Hand
    right : Hook

the compiler incorrectly reports:

Refinement errors in the following places:
Improperly nested clafer 'Hook' on line 7 column 5

However, changing the model as follows:

abstract Person
    abstract Hand : Object
    abstract Hook : Hand

compiles without any errors.