Created
April 1, 2015 17:48
-
-
Save fenollp/c08e86bdf15b28552824 to your computer and use it in GitHub Desktop.
Erlang not good with strings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% -*- coding: utf-8 -*- | |
-module(wat_clauses). | |
%% wat_clauses: | |
%% a warning should be emitted as 2nd clause will never match (given 1st clause) | |
-export([authenticate_nouns/1]). | |
%% API | |
authenticate_nouns([{<<"user_auth">>, _}]) -> 'true'; | |
authenticate_nouns([{<<"user_auth">>, [<<"recovery">>]}]) -> hi; | |
authenticate_nouns(_Nouns) -> 'false'. | |
%% End of Module. |
Yes, wat_clauses:authenticate_nouns([{<<"user_auth">>, [<<"recovery">>]}])
is true
instead of hi
.
The thing is warnings need to be emitted, either by erlc
or dialyzer
, and none do.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Probably not the intended order!