From edca72c160967f1918b65c91a40de89ecd8badda Mon Sep 17 00:00:00 2001 From: Mel Date: Wed, 1 Jun 2022 19:51:40 +0000 Subject: Implement proper object types --- pkg/lang/vm/errors.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'pkg/lang/vm/errors.go') diff --git a/pkg/lang/vm/errors.go b/pkg/lang/vm/errors.go index 4781179..fb37726 100644 --- a/pkg/lang/vm/errors.go +++ b/pkg/lang/vm/errors.go @@ -62,6 +62,14 @@ func (e ErrCorruptedMemCell) Error() string { return fmt.Sprintf("corrupted memory cell at %s", e.Ptr.String()) } +type ErrCantReanchorType struct { + Type value.TypeKind +} + +func (e ErrCantReanchorType) Error() string { + return fmt.Sprintf("can't reanchor type of value which already is of type %v", e.Type) +} + // Non-fatal errors, which will later be implemented as catchable exceptions type ErrInvalidOperandType struct { -- cgit 1.4.1