[Bug 25590] Off-by-one in 3.2.6 effective overload set algorithm

# bugzilla at jessica.w3.org (3 years ago)

www.w3.org/Bugs/Public/show_bug.cgi?id=25590

Nils Barth nbarth+w3bugzilla@google.com changed:

       What    |Removed                     |Added

             CC|                            |nbarth+w3bugzilla@google.co
               |                            |m

--- Comment #1 from Nils Barth nbarth+w3bugzilla@google.com ---

Thanks Joshua! I'm referring to: heycam.github.io/webidl/#dfn-effective-overload-set

To fix this, there are two solutions, right?

Option A: Replace:

  1. While i ≥ 0: with:
  2. While i > 0:

Option B: Remove: 8. If n > 0 ... ...and preferably amend 5.7.2 to:

  1. Otherwise, add to S the tuple <X, t0..i−1, o0..i−1>; if i is 0, this means

to add to S the tuple <X, (), ()> (where “()” represents the empty list).

Option A is probably simpler and more explicit spec-wise, because it avoids the negative indexes and is explicit about the bound.

Contact us to advertise here
# bugzilla at jessica.w3.org (3 years ago)

www.w3.org/Bugs/Public/show_bug.cgi?id=25590

--- Comment #2 from Joshua Bell jsbell@google.com --- (In reply to Nils Barth from comment #1)

To fix this, there are two solutions, right?

Yep, and I agree that A seems simpler.

We might be missing some intentional subtlety, though, so I just wanted to point out the issue and let Cameron weigh in.

# bugzilla at jessica.w3.org (5 days ago)

www.w3.org/Bugs/Public/show_bug.cgi?id=25590

Tobie Langel tobie.langel@gmail.com changed:

       What    |Removed                     |Added

         Status|NEW                         |ASSIGNED
             CC|                            |tobie.langel@gmail.com

--- Comment #3 from Tobie Langel tobie.langel@gmail.com ---

Tentative fix: heycam/webidl#390

# bugzilla at jessica.w3.org (3 days ago)

www.w3.org/Bugs/Public/show_bug.cgi?id=25590

Tobie Langel tobie.langel@gmail.com changed:

       What    |Removed                     |Added

     Resolution|---                         |FIXED
         Status|ASSIGNED                    |RESOLVED

--- Comment #4 from Tobie Langel tobie.langel@gmail.com ---

Fixed in heycam/webidl/commit/fb40c8e

Want more features?

Request early access to our private beta of readable email premium.