overpy icon indicating copy to clipboard operation
overpy copied to clipboard

Add type checking

Open Zezombye opened this issue 5 years ago • 0 comments

  • [x] Add the return type of each function
  • [ ] Add a warning if comparing types that are not equal (the special "any" type returned from variables is allowed to be compared to any suitable type ; floats and ints are allowed to be compared), eg "1 == eventPlayer" will throw a warning
  • [ ] Add a warning if comparing floats (or an int and a float) with equality/inequality, same for any sub-type containing ints/floats, eg "vect(1,2,3) == eventPlayer.getPosition()" will throw a warning
  • [x] Add a warning if passing the wrong argument type to a function (eg passing an array of players to a function that expects a player)
  • [ ] Add the #!useStrict compiler option that throws an error instead of a warning

Zezombye avatar Feb 18 '20 09:02 Zezombye