Skip to content

~m{a: 1} generates atom instead of string #15

@KristerV

Description

@KristerV

thanks for the library. i had my homegrown thing which wasn't half as powerful.

there's a bug when using alt names:

iex> Mix.install([:decimal, {:shorter_maps, "~> 2.0"}])
iex> import ShorterMaps
iex> ~m{a}   
%{"a" => 1}
iex> ~m{a: 1}
%{a: 1}

So in ~m{a} the key will be a string and in ~m{a: 1} the key will be an atom.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions