Better argument validation for some list methods.
This commit is contained in:
@@ -0,0 +1 @@
|
||||
1 / false // expect runtime error: Right operand must be a number.
|
||||
@@ -1 +0,0 @@
|
||||
1 / false // expect runtime error: TypeError: Right operand must be Num.
|
||||
@@ -0,0 +1 @@
|
||||
1 - false // expect runtime error: Right operand must be a number.
|
||||
@@ -1 +0,0 @@
|
||||
1 - false // expect runtime error: TypeError: Right operand must be Num.
|
||||
@@ -0,0 +1 @@
|
||||
1 % false // expect runtime error: Right operand must be a number.
|
||||
@@ -1 +0,0 @@
|
||||
1 % false // expect runtime error: TypeError: Right operand must be Num.
|
||||
@@ -0,0 +1 @@
|
||||
1 * false // expect runtime error: Right operand must be a number.
|
||||
@@ -1 +0,0 @@
|
||||
1 * false // expect runtime error: TypeError: Right operand must be Num.
|
||||
@@ -0,0 +1,3 @@
|
||||
1 + false // expect runtime error: Right operand must be a number.
|
||||
|
||||
// TODO: What about a string on the RHS?
|
||||
@@ -1,3 +0,0 @@
|
||||
1 + false // expect runtime error: TypeError: Right operand must be Num.
|
||||
|
||||
// TODO: What about a string on the RHS?
|
||||
Reference in New Issue
Block a user