Commit Graph
1270 Commits
Author SHA1 Message Date
Eksperimental 33bb6f3d14 Properly spell UTF-8 (#5373) 2016-10-28 21:09:23 +02:00
José Valim f0b84922d9 Ensure we consistently wrap variables in quotes 2016-10-22 22:25:18 +02:00
Aleksei Magusev ecf9713070 Refactor loading logic for macros in import/2 2016-10-22 21:56:18 +02:00
Aleksei Magusev c3ae2a4efa Fully validate the shape of the options for import/2 2016-10-22 20:53:34 +02:00
Aleksei Magusev 2b2afceeb4 Add comment why we do not check :except exports in import/2 2016-10-22 20:50:14 +02:00
Aleksei Magusev 290447cabe There is no :erlang.is_record/1 function 2016-10-21 00:58:39 +02:00
Eksperimental aa030d22cd Reword "pseudo-variables" with "compilation environment macros" (#5308)
As discussed in https://github.com/elixir-lang/elixir/pull/5301#pullrequestreview-3711427.
2016-10-12 00:49:47 +02:00
Aleksei Magusev 837a720037 Add TODO about generated/0 removal 2016-10-09 11:29:14 +02:00
Aleksei Magusev 2e301f4910 Compile or/2 to case/2 when in non-guard context 2016-10-08 22:46:06 +02:00
Aleksei Magusev 3c34ebd407 Compile and/2 to case/2 when in non-guard context 2016-10-08 22:46:04 +02:00
José Valim d8adc34e68 Add a TODO to variable warnings 2016-10-04 14:19:25 +02:00
Aleksei Magusev 8eae1166fd Consider is_process_alive/1 calls in returns_boolean/1 check 2016-09-28 13:19:26 +02:00
Aleksei Magusev 79a72ae26c Consider is_record/1,2,3 calls in returns_boolean/1 check 2016-09-28 13:08:45 +02:00
Aleksei Magusev 4e681d5fcb Consider is_map/1 calls in returns_boolean/1 check 2016-09-28 12:49:49 +02:00
José Valim 89adb42b58 Update return boolean check for orelse/andalso 2016-09-28 10:30:48 +02:00
José Valim 819d81c28e Do not build matches if variables are the same 2016-09-27 18:24:34 +02:00
José Valim 8e2a1e5851 Remove Kernel.rand/0 and Kernel.rand/1
Since Enum.random/1 already provides the Kernel.rand/1
functionality.
2016-09-21 23:39:33 +02:00
Andrea Leopardi dd78780363 Fix a few typos introduced in 904e89782d 2016-09-21 11:11:16 +02:00
Steven Blowers 904e89782d Fixing spelling mistakes of specially -> especially. (#5235) 2016-09-21 10:27:34 +02:00
José Valim c05151f278 Update CHANGELOG 2016-09-17 22:40:54 +02:00
Pedro Medeiros 0d2870f050 Fix some exported from case from erlang source (#5214)
Some erlang code were emiting a warning message when some
variables were defined inside the case statement.
2016-09-14 13:45:32 +02:00
Michał Muskała dadf98fbff Introduce Process.send_after/4 (#5182) 2016-09-07 22:39:12 +02:00
José Valim 786da1ffe0 Add Kernel.rand/0 and Kernel.rand/1
Thanks to Hal Fulton for the proposal and original code.
2016-09-07 13:07:52 +02:00
Aleksei Magusev fd17c6fefa Produce meaningful warning when with's else clauses have no effect (#5179)
Isolated example:

  defmodule Foo do
    def foo(arg) do
      with foo = arg do
        foo
      else
        _ -> nil
      end
    end
  end
2016-09-04 01:55:39 +02:00
Michał Muskała 8277dcd776 Make sure bad remote call errors have file/line info (#5116)
Change how we mark the generated AST for suppressing dialyzer errors -
instead of [generated: true, location: 0], we provide proper line number.
This means, however, that on OTP 18, those nodes won't be recognized
as generated and warnings will be issued.
It was decided that proper error messages are more important than
avoiding bogus dialyzer warnings.
The old mark for generated code is left in places that made compiler
issue warnings on 18.

The bad remote call dialyzer warnings can be suppressed with the
@dialyzer :no_fail_call
module attribute.
2016-08-15 13:18:09 +01:00
Aleksei Magusev 34bf464bc1 Remove trailing period in error message for missing terminator 2016-08-13 00:44:49 +02:00
ottolin 5eb2e30b1a Enhancing error message for token matching failure (#5123) 2016-08-10 13:55:03 +02:00
José Valim 3c68af7ce3 Properly splice binaries inside binaries 2016-08-09 01:38:01 +02:00
José Valim 8ce699edc5 Always include the compiled file source in manifests
See https://github.com/plataformatec/nimble_csv/issues/4.
2016-08-04 20:12:24 +02:00
Michał Muskała 270c983b13 Mark struct update syntax as generated (#5067)
With changes to OTP 19, dialyzer started emitting warnings for
the struct update syntax where variable could only be that struct.
For example:

    def foo(%Foo{} = struct), do: %Foo{struct | bar: :baz}
2016-07-27 11:26:45 +02:00
José Valim 34052cfca0 Emit compilation warnings for HashDict, HashSet and Dict 2016-07-23 12:31:12 +02:00
José Valim 78c7ddc03f Simplify type splicing for binaries 2016-07-16 20:31:03 +02:00
Aleksei Magusev 3f9a4c044a Rewrite Enum.into/2,3 with empty map into Map.new/1,2 2016-07-09 16:31:30 +02:00
Aleksei Magusev 05db28b28f Rewrite Enum.reverse/1 to Enum.reverse/2 for non-lists 2016-07-08 23:33:54 +02:00
Andrea Leopardi d80038f86a Force defmodule to not be tail-call optimized (#4958) 2016-07-08 10:35:47 +02:00
Eric Entin 26063877da The else clause in with supports guards (#4960) 2016-07-07 20:26:35 +02:00
Artur Cygan d3ae3d5cb1 Improve error message when importing undefined or private function (#4946) 2016-07-06 00:42:19 +02:00
Andrea Leopardi dffebbe85b Remove defmacrop support in leftover code in elixir_def_overridable (#4922)
Support for private overridable macros was officially dropped in 3c88c16
we forgot to remove it from some code in elixir_def_overridable (which
is now harmless but superfluous code).
2016-07-01 23:31:41 +02:00
Eric Meadows-Jönsson c7081fd2aa Fix struct/0 typespec
Closes #4915.
2016-06-30 19:33:22 +02:00
Mike Stok 05431f6010 keep tokenizer's column counts in sync for numbers with _ characters
For providing better feedback in credo and tools like it we should be
able to map a token back to its original source.  This makes sure that
`_` characters in numbers are properly accounted for so that they stay
in sync after we've encountered something like 123_456_789.

Signed-off-by: José Valim <jose.valim@plataformatec.com.br>
2016-06-30 10:25:43 +01:00
José Valim 584f49f88c Do not attempt to load modules that have not been required, closes #4900
Signed-off-by: José Valim <jose.valim@plataformatec.com.br>
2016-06-29 01:21:53 +01:00
José Valim b98b4bd235 Ensure structs can be expanded in dynamic module names, closes #4894 2016-06-28 10:30:15 +01:00
Eksperimental 31822b42f0 Properly spell PID (#4883) 2016-06-25 09:03:35 +02:00
Aleksei Magusev 654cd77501 Simplify function kind check in elixir_def_overridable.erl 2016-06-22 13:11:43 +02:00
Andrea Leopardi 881c2d6638 Support macros with defoverridable/super (#4848) 2016-06-22 11:40:24 +02:00
José Valim f4b5e43fc1 Explicitly announce structs
Before this patch, we could announce a struct too early,
only when __struct__/0 was defined (and not __struct__/1)
leading to deadlocks in the compiler. We fixed the bug and
made struct announcements to avoid future bugs.

Closes #4844
2016-06-22 10:05:01 +02:00
Daniel Perez e9f2c2547d Improve with/else error message on invalid form (#4847) 2016-06-22 09:30:54 +02:00
José Valim 077aca5db1 Do not expect stacktraces to be always present, closes #4840 2016-06-21 20:26:46 +02:00
Pedro Medeiros 0066d11771 Simplify code to remove warning: unsafe in 'case' (#4816) 2016-06-15 18:41:01 +02:00
José Valim 1aca21c876 Ensure variables in function clauses are not reused, closes #4815
Signed-off-by: José Valim <jose.valim@plataformatec.com.br>
2016-06-15 16:14:48 +02:00