arr-ai / arrai

The ultimate data engine.
http://arr.ai
Apache License 2.0
20 stars 15 forks source link

Print error message if the first cond pattern is ident pattern #479

Closed ericzhang6222 closed 4 years ago

ericzhang6222 commented 4 years ago

Fixes #472 .

Changes proposed in this pull request:

Checklist:

coveralls commented 4 years ago

Pull Request Test Coverage Report for Build cee7c62ca9e8f0a585bf4e2bedf7934f3fba50dd-PR-479


Changes Missing Coverage Covered Lines Changed/Added Lines %
rel/expr_cond_pattern_control_var.go 0 7 0.0%
<!-- Total: 0 7 0.0% -->
Files with Coverage Reduction New Missed Lines %
rel/value_set_generic.go 2 74.47%
rel/value_set_str.go 4 59.65%
<!-- Total: 6 -->
Totals Coverage Status
Change from base Build a54e1484615ecec9b3d6388de844c50bdc328ee4: -0.08%
Covered Lines: 4295
Relevant Lines: 9024

💛 - Coveralls
marcelocantos commented 4 years ago

As a follow up, raise an issue to fail for all unreachable cases. E.g., the first condition renders the third condition unreachable in the following code:

cond {
    [x, ...]: x,
    (:a): a,
    [x, y]: x + y,
}
ericzhang6222 commented 4 years ago

Close it, will rework and raise new PR in #484

marcelocantos commented 4 years ago

@ericzhang6222 do you still need the branch?

ericzhang6222 commented 4 years ago

@ericzhang6222 do you still need the branch?

I have removed branch.