From 70e2754d086d2e779aa3bb2ce841267408ab0c46 Mon Sep 17 00:00:00 2001 From: Andrea Leopardi Date: Fri, 27 Apr 2018 14:40:51 -0300 Subject: FIXUP --- lib/elixir/src/elixir_tokenizer.erl | 2 +- lib/elixir/test/elixir/kernel/warning_test.exs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/elixir/src/elixir_tokenizer.erl b/lib/elixir/src/elixir_tokenizer.erl index 7dbd21096..f5f660b5f 100644 --- a/lib/elixir/src/elixir_tokenizer.erl +++ b/lib/elixir/src/elixir_tokenizer.erl @@ -547,7 +547,7 @@ maybe_warn_for_ambiguous_bang_before_equals(Kind, Atom, [$= | _], Scope, Line) - case lists:last(Identifier) of Last when Last == $!; Last == $? -> - Msg = io_lib:format("found an ~ts \"~ts\", ending with ~ts, followed by =. " + Msg = io_lib:format("found ~ts \"~ts\", ending with \"~ts\", followed by =. " "It is unclear if you mean \"~ts ~ts=\" or \"~ts =\". Please add " "a space before or after ~ts to remove the ambiguity", [What, Identifier, [Last], lists:droplast(Identifier), [Last], Identifier, [Last]]), diff --git a/lib/elixir/test/elixir/kernel/warning_test.exs b/lib/elixir/test/elixir/kernel/warning_test.exs index 23bc273af..7ecd80833 100644 --- a/lib/elixir/test/elixir/kernel/warning_test.exs +++ b/lib/elixir/test/elixir/kernel/warning_test.exs @@ -33,10 +33,10 @@ defmodule Kernel.WarningTest do test "identifier that ends in ! followed by the = operator without a space in between" do output = capture_err(fn -> Code.eval_string("foo!= 1") end) - assert output =~ "found an identifier \"foo!\", ending with !" + assert output =~ "found identifier \"foo!\", ending with !" output = capture_err(fn -> Code.eval_string(":foo!= :foo!") end) - assert output =~ "found an atom \":foo!\", ending with !" + assert output =~ "found atom \":foo!\", ending with !" end test "unused variable" do -- cgit v1.2.1