Skip to content

Remove a duplicated pattern matching in erl_epmd.erl#1119

Merged
psyeugenic merged 1 commit into
erlang:maintfrom
okumin:remove-duplicated-line
Jul 26, 2016
Merged

Remove a duplicated pattern matching in erl_epmd.erl#1119
psyeugenic merged 1 commit into
erlang:maintfrom
okumin:remove-duplicated-line

Conversation

@okumin

@okumin okumin commented Jul 2, 2016

Copy link
Copy Markdown
Contributor

select_best_version has the duplicated case.

`select_best_version` has the duplicated case.
@OTP-Maintainer

Copy link
Copy Markdown

Patch has passed first testings and has been assigned to be reviewed


I am a script, I am not human


@garazdawi garazdawi added team:VM Assigned to OTP team VM enhancement labels Jul 4, 2016
@IngelaAndin IngelaAndin added team:VM Assigned to OTP team VM and removed team:VM Assigned to OTP team VM enhancement labels Jul 4, 2016
@psyeugenic psyeugenic self-assigned this Jul 25, 2016
@psyeugenic psyeugenic merged commit 3f8e6c2 into erlang:maint Jul 26, 2016
@fenollp

fenollp commented Jul 26, 2016

Copy link
Copy Markdown
Contributor

Shouldn't this be caught by the compiler?

@psyeugenic

Copy link
Copy Markdown
Contributor

Ideally yes, however the guard complicates matter. The compiler can't coalesce the clauses since it doesn't know what the guard will evaluate to. It could probably probe a bit deeper than it does today and be nominally better.

@fenollp

fenollp commented Jul 26, 2016

Copy link
Copy Markdown
Contributor

Regardless of the guard's outcome, the two clauses match exactly the same pattern. Or is it more complicated than that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement team:VM Assigned to OTP team VM

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants