mikesamuel / evalable

Relax the requirement that the argument to eval be a string in a non-breaking way
MIT License
3 stars 0 forks source link

Question: Can this function ever get into step 2a? #1

Closed JakeChampion closed 5 years ago

JakeChampion commented 5 years ago

https://mikesamuel.github.io/evalable/#sec-iscodelike

2.2 Runtime Semantics: IsCodeLike ( x, currentRealm ) The abstract operation IsCodeLike with argument x, currentRealm performs the following steps:

  1. If Type(x) is not String, return true.
  2. If Type(x) is Object, then a. Let evalable be ? Get(x, @@evalable). b. Return ToBoolean(evalable).
  3. Return false.
mikesamuel commented 5 years ago

Thanks. I'm an idiot. That "not" shouldn't be there. Will fix.