Properly evaluate empty map updates and patterns #281

Merged
merged 3 commits into from Mar 18, 2014

Conversation

Projects
None yet
3 participants
@nox
Contributor

nox commented Mar 8, 2014

Code like [camembert]#{} and #{} = 1 didn't check that the argument is indeed a map.

@nox

This comment has been minimized.

Show comment Hide comment
@nox

nox Mar 9, 2014

Contributor

I've added a commit to fix a related bug reported by @josevalim.

Contributor

nox commented Mar 9, 2014

I've added a commit to fix a related bug reported by @josevalim.

@psyeugenic

This comment has been minimized.

Show comment Hide comment
@psyeugenic

psyeugenic Mar 10, 2014

Contributor

CI is down atm (server replacement).

Contributor

psyeugenic commented Mar 10, 2014

CI is down atm (server replacement).

@psyeugenic psyeugenic self-assigned this Mar 10, 2014

@nox

This comment has been minimized.

Show comment Hide comment
@nox

nox Mar 10, 2014

Contributor

Let me believe I DoS'd the previous one =)

Contributor

nox commented Mar 10, 2014

Let me believe I DoS'd the previous one =)

@psyeugenic

This comment has been minimized.

Show comment Hide comment
@psyeugenic

psyeugenic Mar 10, 2014

Contributor

I wouldn't rule it out. =)
Edit: rewording.

Contributor

psyeugenic commented Mar 10, 2014

I wouldn't rule it out. =)
Edit: rewording.

@psyeugenic

This comment has been minimized.

Show comment Hide comment
@psyeugenic

psyeugenic Mar 11, 2014

Contributor

Added to daily build

Contributor

psyeugenic commented Mar 11, 2014

Added to daily build

@psyeugenic

This comment has been minimized.

Show comment Hide comment
@psyeugenic

psyeugenic Mar 13, 2014

Contributor

You need to add -compile(no_native). to erl_eval since HiPE does not understand the instruction {test,is_map,Lbl,[Srcs]}. It breaks --enable-native-libs

Same goes for any other Map code additions in stdlib.

Contributor

psyeugenic commented Mar 13, 2014

You need to add -compile(no_native). to erl_eval since HiPE does not understand the instruction {test,is_map,Lbl,[Srcs]}. It breaks --enable-native-libs

Same goes for any other Map code additions in stdlib.

@nox

This comment has been minimized.

Show comment Hide comment
@nox

nox Mar 13, 2014

Contributor

Noted! Will amend.

Contributor

nox commented Mar 13, 2014

Noted! Will amend.

@psyeugenic

This comment has been minimized.

Show comment Hide comment
@psyeugenic

psyeugenic Mar 14, 2014

Contributor

Also, at least two tests fails in map_SUITE in debugger:

  • map_SUITE:t_update_map_expressions failed on line 229
    Reason: {badmatch,{'EXIT',{{badarg,<<>>},[{map_SUITE,t_update_map_ex...}
  • map_SUITE:t_update_assoc failed on line 247
    Reason: {badmatch,{'EXIT',{{badarg,badmap},[{map_SUITE,t_update_asso...}

This also there is a mismatch between debugger and compiled code since map_SUITE is copied. In this case the mismatch is the stacktrace.

Contributor

psyeugenic commented Mar 14, 2014

Also, at least two tests fails in map_SUITE in debugger:

  • map_SUITE:t_update_map_expressions failed on line 229
    Reason: {badmatch,{'EXIT',{{badarg,<<>>},[{map_SUITE,t_update_map_ex...}
  • map_SUITE:t_update_assoc failed on line 247
    Reason: {badmatch,{'EXIT',{{badarg,badmap},[{map_SUITE,t_update_asso...}

This also there is a mismatch between debugger and compiled code since map_SUITE is copied. In this case the mismatch is the stacktrace.

@OTP-Maintainer

This comment has been minimized.

Show comment Hide comment
@OTP-Maintainer

OTP-Maintainer Mar 14, 2014

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

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

@nox

This comment has been minimized.

Show comment Hide comment
@nox

nox Mar 14, 2014

Contributor

Fixed the two tests and amended erl_lint.

I had to change the tests in debugger to make it behave more like erl_lint.

Contributor

nox commented Mar 14, 2014

Fixed the two tests and amended erl_lint.

I had to change the tests in debugger to make it behave more like erl_lint.

@nox

This comment has been minimized.

Show comment Hide comment
@nox

nox Mar 15, 2014

Contributor

I didn't push. I am stupid.

Contributor

nox commented Mar 15, 2014

I didn't push. I am stupid.

@OTP-Maintainer

This comment has been minimized.

Show comment Hide comment
@OTP-Maintainer

OTP-Maintainer Mar 15, 2014

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

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

@OTP-Maintainer

This comment has been minimized.

Show comment Hide comment
@OTP-Maintainer

OTP-Maintainer Mar 16, 2014

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

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

@psyeugenic psyeugenic merged commit 4185be0 into erlang:master Mar 18, 2014

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