From 550aa0a288a00d820927a84b4f54a25f6c544643 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Tue, 20 Jun 2023 08:57:11 +0200 Subject: any --- evaluator/evaluator.go | 2 +- evaluator/evaluator_test.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'evaluator') diff --git a/evaluator/evaluator.go b/evaluator/evaluator.go index e7b7193..c9d13d7 100644 --- a/evaluator/evaluator.go +++ b/evaluator/evaluator.go @@ -300,7 +300,7 @@ func isTruthy(obj object.Object) bool { } } -func newError(format string, a ...interface{}) *object.Error { +func newError(format string, a ...any) *object.Error { return &object.Error{Message: fmt.Sprintf(format, a...)} } diff --git a/evaluator/evaluator_test.go b/evaluator/evaluator_test.go index fd1cef2..f7c235d 100644 --- a/evaluator/evaluator_test.go +++ b/evaluator/evaluator_test.go @@ -94,7 +94,7 @@ func TestBangOperator(t *testing.T) { func TestIfElseExpressions(t *testing.T) { tests := []struct { input string - expected interface{} + expected any }{ {"if (true) { 10 }", 10}, {"if (false) { 10 }", nil}, @@ -361,7 +361,7 @@ func TestStringConcatenation(t *testing.T) { func TestBuiltinFunctions(t *testing.T) { tests := []struct { input string - expected interface{} + expected any }{ {`len("")`, 0}, {`len("four")`, 4}, @@ -440,7 +440,7 @@ func TestArrayLiterals(t *testing.T) { func TestArrayIndexExpressions(t *testing.T) { tests := []struct { input string - expected interface{} + expected any }{ { "[1, 2, 3][0]", @@ -538,7 +538,7 @@ func TestHashLiterals(t *testing.T) { func TestHashIndexExpressions(t *testing.T) { tests := []struct { input string - expected interface{} + expected any }{ { `{"foo": 5}["foo"]`, -- cgit v1.2.3