%q replaced by %s in some error messages
This commit is contained in:
+1
-1
@@ -27,7 +27,7 @@ func TestFuncs(t *testing.T) {
|
||||
/* 14 */ {`two=func(){2}; two(123)`, nil, `two(): too much params -- expected 0, got 1`},
|
||||
/* 15 */ {`f=func(x,n=2){x+n}; f(3)`, int64(5), nil},
|
||||
/* 16 */ {`f=func(x,n=2,y){x+n}`, nil, `[1:16] can't mix default and non-default parameters`},
|
||||
/* 17 */ {`f=func(x,n){1}; f(3,4,)`, nil, `[1:24] expected "function-param-value", got ")"`},
|
||||
/* 17 */ {`f=func(x,n){1}; f(3,4,)`, nil, "[1:24] expected `function-param-value`, got `)`"},
|
||||
/* 18 */ {`factory=func(base){func(){@base=base+1}}; inc10=factory(10); inc5=factory(5); inc10(); inc5(); inc10()`, int64(12), nil},
|
||||
/* 19 */ {`f=func(a,y=1,z="sos"){}; string(f)`, `f(a, y=1, z="sos"):any{}`, nil},
|
||||
// /* 20 */ {`a=[func(){3}]; a[0]()`, int64(3), nil},
|
||||
|
||||
Reference in New Issue
Block a user