Error checking for misspelled enums

Issue #690 resolved
created an issue

I think these should error, and it might be nice if it gave a list of accepted enum values in the error message.

love.filesystem.newFileData('', '', 'hehehe'), 1)), 1, 'hehehe')
source ='music.ogg', 'hehehe')
source:seek(1, 'hehehe')
love.physics.newBody(love.physics.newWorld(), 0, 0, 'hehehe')'hehehe') -- Like how it is currently though, I don't think it should error when given no arguments, because this might be useful in practice.

Comments (6)

  1. hahawoo reporter

    Yeah, and plus if it's a typo it's probably easy enough to see the misspelling.

    Just wondering, why wasn't changed?

  2. Alex Szpakowski

    It's more consistent to change it, but I've used the fact that it doesn't error like that in the past to have nicer code across LÖVE versions which change the isSupported strings (e.g. "pixeleffect" to "shader".)

    I haven't completely made up my mind yet. :p

  3. Log in to comment