test: cover method return multiplication diagnostics
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
CLASS Player
|
||||
HAS score NUMBER
|
||||
|
||||
TEACH total amount RETURNS NUMBER
|
||||
CHECK TYPE amount IS NUMBER
|
||||
RETURN amount * "oops"
|
||||
END
|
||||
END
|
||||
@@ -0,0 +1,11 @@
|
||||
CLASS Player
|
||||
HAS score NUMBER
|
||||
|
||||
TEACH total amount RETURNS NUMBER
|
||||
CHECK TYPE amount IS NUMBER
|
||||
RETURN amount * 2
|
||||
END
|
||||
END
|
||||
|
||||
NEW Player player
|
||||
DO player.total 3
|
||||
Reference in New Issue
Block a user