core.match

throw if binding name reused in the same pattern row

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Patch:
    Code and Test
  • Approval:
    Ok
  1. dup.patch
    15/Oct/11 3:43 PM
    5 kB
    Steve Miner
  2. dup2.patch
    16/Oct/11 3:53 PM
    5 kB
    Steve Miner
  3. dup3.patch
    18/Oct/11 2:47 PM
    5 kB
    Steve Miner
  4. dup4.patch
    19/Oct/11 7:22 AM
    5 kB
    Steve Miner

Activity

David Nolen made changes -
Field Original Value New Value
Summary throw if binding name reused throw if binding name reused in the same pattern row
Hide
Steve Miner added a comment -

Checks for duplicate wildcard names in a pattern row.

Show
Steve Miner added a comment - Checks for duplicate wildcard names in a pattern row.
Steve Miner made changes -
Attachment dup.patch [ 10402 ]
Hide
David Nolen added a comment -

You should be able to reuse bindings as is done in the red black tree pattern as there is no ambiguity there. If we can get that enhancement in I'll gladly accept this. Thanks for taking this on!

Show
David Nolen added a comment - You should be able to reuse bindings as is done in the red black tree pattern as there is no ambiguity there. If we can get that enhancement in I'll gladly accept this. Thanks for taking this on!
Hide
Steve Miner added a comment -

The new patch allows OR patterns to reuse wildcards, but still complains if there are other ambiguities. I added a couple of tests to illustrate.

Show
Steve Miner added a comment - The new patch allows OR patterns to reuse wildcards, but still complains if there are other ambiguities. I added a couple of tests to illustrate.
Steve Miner made changes -
Attachment dup2.patch [ 10404 ]
Hide
David Nolen added a comment -

This looks good. It looks like you created this patch before I added your match-let. Mind creating a new version of this patch against HEAD? Thanks much.

Show
David Nolen added a comment - This looks good. It looks like you created this patch before I added your match-let. Mind creating a new version of this patch against HEAD? Thanks much.
Hide
Steve Miner added a comment -

Updated patch for latest HEAD

Show
Steve Miner added a comment - Updated patch for latest HEAD
Steve Miner made changes -
Attachment dup3.patch [ 10410 ]
Hide
David Nolen added a comment -

I'm trying to apply with patch with git am, but I keep getting:

Applying: * src/main/clojure/clojure/core/match.clj: Add Stephen Miner's match-let
error: patch failed: src/main/clojure/clojure/core/match.clj:1532
error: src/main/clojure/clojure/core/match.clj: patch does not apply
Patch failed at 0001 * src/main/clojure/clojure/core/match.clj: Add Stephen Miner's match-let

It looks like the previous commit of my pasting of your match-let patch is mixed up into your latest patch.

Show
David Nolen added a comment - I'm trying to apply with patch with git am, but I keep getting: Applying: * src/main/clojure/clojure/core/match.clj: Add Stephen Miner's match-let error: patch failed: src/main/clojure/clojure/core/match.clj:1532 error: src/main/clojure/clojure/core/match.clj: patch does not apply Patch failed at 0001 * src/main/clojure/clojure/core/match.clj: Add Stephen Miner's match-let It looks like the previous commit of my pasting of your match-let patch is mixed up into your latest patch.
Hide
Steve Miner added a comment -

Sorry, I made a git mistake with dup3.patch. I made a fresh patch called dup4.patch that should fix the problem.

Show
Steve Miner added a comment - Sorry, I made a git mistake with dup3.patch. I made a fresh patch called dup4.patch that should fix the problem.
Steve Miner made changes -
Attachment dup4.patch [ 10490 ]
David Nolen made changes -
Status Open [ 1 ] Resolved [ 5 ]
Approval Ok [ 10007 ]
Resolution Completed [ 1 ]
Patch Accepted [ 10012 ]
Alex Miller made changes -
Patch Accepted [ 10012 ] Code and Test [ 10002 ]
David Nolen made changes -
Status Resolved [ 5 ] Closed [ 6 ]

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: