about summary refs log tree commit diff
path: root/pkg/lang/vm/errors.go
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2022-06-01 19:51:40 +0000
committerGitHub <noreply@github.com>2022-06-01 19:51:40 +0000
commitedca72c160967f1918b65c91a40de89ecd8badda (patch)
treeb79feabc0889a3f6cfddf09906a486d09e5c60a1 /pkg/lang/vm/errors.go
parent33671436680e7922001df9921ee582c486c7c3f4 (diff)
downloadjinx-edca72c160967f1918b65c91a40de89ecd8badda.tar.zst
jinx-edca72c160967f1918b65c91a40de89ecd8badda.zip
Implement proper object types
Diffstat (limited to 'pkg/lang/vm/errors.go')
-rw-r--r--pkg/lang/vm/errors.go8
1 files changed, 8 insertions, 0 deletions
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 {