Skip to content

foralls not enforced/undefined types not caught in class instances #240

@mbenke

Description

@mbenke
forall self.
class self:C {
    function size(x:self) -> word;
}

instance ():C {
    function size(x:()) -> word {
        return 0;
    }
}

instance uint:C {
    function size(x:uint) -> word {
        return 1;
    }
}

Rather than complain about `uint, as it should, the typechecker issues a head-scratching error:

Overlapping instances are not supported
instance:
?$3 : C
overlaps with:
() : C

 - in:instance uint : C {
   function size (x : uint) -> word {
      return 1;
   }
}

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions