José Valim
9904bdce9d
Warn on undefined module attributes, closes #963
2013-06-18 12:19:15 +02:00
José Valim
754418493f
Merge pull request #1275 from ericmj/elixir-in-warning
...
Emit warning for 'x in []' in guards
2013-06-18 03:04:05 -07:00
Eric Meadows-Jonsson
27000ea1b4
Emit warning for 'x in []' in guards
2013-06-18 11:57:27 +02:00
José Valim
620ee4298c
Raise proper warnings when default clauses from different definitions collide, closes #1244
2013-06-18 11:36:57 +02:00
José Valim
91c0fa71fa
Avoid clash in between modules
2013-06-17 13:19:07 +02:00
José Valim
87da4e91bb
Clean up error messages, move defaults warning to an error
2013-06-17 13:05:57 +02:00
José Valim
f88ee1c23a
Do not check in utf8 directories into source control
2013-06-17 08:57:53 +02:00
José Valim
67896b56c5
Ensure errors point to the proper -> clauses
...
This commit changes the -> clauses representation from:
{ :->, meta, list({ list(expr), expr }) }
To:
{ :->, meta, list({ list(expr), meta, expr }) }
Now clauses can store metadata, which allows us to provide
accurate reporting information.
Closes #1215
2013-06-16 17:27:14 +02:00
José Valim
d21d603617
Avoid race condition on CLI tests
2013-06-16 13:57:52 +02:00
José Valim
19ff7a03f9
Ensure imports inside quotes are properly registered, closes #1225
2013-06-16 13:18:47 +02:00
José Valim
7f5744bde7
Ensure defmodule :atom does not define an alias
2013-06-16 13:10:59 +02:00
José Valim
b87797f788
Return Foo for __MODULE__.Foo outside of a module
2013-06-16 13:10:59 +02:00
Rafael Mendonça França
7cdc25538e
Uniform use of whitespace after commas on codebase
...
This make easier to read and also follow some standard in the code
2013-06-15 16:52:48 -03:00
José Valim
80e41f8b4b
Allow +, -, and friends to be called dynamically
...
Our compiler still inline those calls. This commit simply
allows one to write:
mod = Kernel
mod.+(1, 2)
2013-06-15 10:45:12 +02:00
José Valim
9e16cf36ed
There is no need for =~ to be a macro
2013-06-15 09:46:19 +02:00
José Valim
21db352039
Always print warnings to stderr
2013-06-15 09:32:53 +02:00
José Valim
45f033d15a
Add a test for warnings_as_errors option
2013-06-15 08:41:27 +02:00
José Valim
e62ef92a4b
Ensure Enum.take/2 doesn't peek ahead
2013-06-14 18:43:05 +02:00
josephwilk
f03e707e8e
Bug: equal? on HashDict was not comparing the two dicts
2013-06-14 11:49:10 +02:00
James Fish
582e814422
Improve efficiency of HashDict contract
...
When contracting in size the HashDict does not need to relocate
(re-hash) key-value pairs. It is not required because each of the
deepest nodes in a trie become a bucket on contraction. This bucket
contains all the key-value pairs in that node.
2013-06-13 18:11:51 +01:00
José Valim
a03639fe1a
Deprecate Regex.index/2
2013-06-13 15:23:03 +02:00
José Valim
e7b1242e98
Fix a bug on Path.split/1
2013-06-13 15:13:56 +02:00
José Valim
d3d83b17f4
Merge pull request #1199 from alco/1148-match-tilde-op
...
Reimplement =~ to use Regex.match? or String.contains?
2013-06-13 06:13:32 -07:00
José Valim
78eb14edae
Merge pull request #1187 from alco/pipeline-op
...
Pipeline op fix + additional assertion
2013-06-13 06:12:25 -07:00
Yuki Ito
961099746e
Implicit super arguments is deprecated
2013-06-13 00:42:34 +09:00
José Valim
fed406a2e6
Rename test/doctest.exs file to test/doc_test.exs to follow file name convention
2013-06-10 14:27:38 +08:00
Alexei Sholik
4a1dfccbec
Use =~ with strings where it makes sense
2013-06-08 15:58:34 +03:00
Alexei Sholik
c62a7e1001
Reimplement =~ to use Regex.match? or String.contains?
2013-06-08 15:00:09 +03:00
Alexei Sholik
2b8854c63e
Add a few sanity check tests for upcase & downcase
2013-06-08 14:33:04 +03:00
Yuki Ito
bd984a545d
to_binary for URI.Info do not ignore the path
2013-06-07 20:28:56 +09:00
José Valim
6ef10d4b0d
Add tests for compile_string and compile_quoted, closes #1206
2013-06-07 14:48:19 +08:00
José Valim
c765a95b91
Ensure default calls are connected in dispatch tracker
2013-06-07 13:34:41 +08:00
Alexei Sholik
32cddf2738
Reorganize tests for starts_with? and co.
2013-06-05 18:58:29 +03:00
Alexei Sholik
7893852f2f
Fix edge case for String.contains?
2013-06-05 18:58:16 +03:00
Alexei Sholik
f1b625ccd2
Don't support nested lists in starts_with? and co.
2013-06-05 18:44:22 +03:00
Alexei Sholik
b96a714240
Fix edge cases for starts_with?, ends_with? and contains?
2013-06-05 18:14:38 +03:00
José Valim
22627c44df
Merge pull request #1188 from josephwilk/string-contains
...
Adding String.contains?
2013-06-05 05:04:44 -07:00
Alexei Sholik
37c8867d9f
Implement assert_compile_fail
...
The format_rescue function has been found useful in multiple instances,
so it made sense to generalize it into its own assertion.
2013-06-05 13:14:29 +03:00
Alexei Sholik
da7e830bf7
Disallow &-partial calls on the right side of |>
2013-06-05 13:08:16 +03:00
Joseph Wilk
f0ecfbfac9
Adding String.contains?
...
Detect whether a string contains another string.
2013-06-04 19:20:11 +02:00
meh
854cab51bc
Implement Binary.Chars for URI.Info
2013-06-04 16:12:55 +02:00
José Valim
c0547a15ce
Ensure Enum.to_list and Dict.to_list return exactly the same result
2013-06-03 20:35:18 +09:00
James Fish
d1fd5a3c2a
Fix HashDict so that key comparison uses exact match
...
This change means that HashDict buckets are nolonger strictly ordered.
Previously keys which compared equal (==) but not exactly equal (===)
would be considered different for large sizes but equivalent for small
sizes. This ambiguity occured because hashes are only equal when terms
are exactly equal (===), so both now use exact (===) key comparisons.
Small HashDicts are still a single ordered list and large HashDicts
contain ordered buckets. Both of these may contain keys that compare
equal (==) but are not exactly equal (===), should these keys be present
in the same list or bucket the ordering of these keys (relative to each
other) is undefined.
See github issue #1171 for examples.
Note: If assumptions were made about the form of a HashDict they may
nolonger be valid. Particularly that HashDicts can nolonger be reliably
pattern matched on for equality.
2013-06-03 02:13:33 +01:00
José Valim
a3aa1e8de5
Ensure noname scope does not leak after assignment
2013-06-03 00:24:14 +09:00
Jonathan J Hunt
636da42f2a
Don't ignore nil during aliasing. Attempt to fix #1159
2013-05-31 15:58:15 -07:00
meh
5e803487ef
Improve Regex.escape tests
2013-05-31 19:04:26 +02:00
meh
caeea8973c
Support extended syntax in Regex.escape
2013-05-31 19:04:26 +02:00
José Valim
453d8835bd
Merge pull request #1150 from alco/to_binary-error
...
Better error message for Binary.Chars.List.to_binary. Closes #1144
2013-05-31 02:21:16 -07:00
Alexei Sholik
2272dd1c46
Better error message for Binary.Chars.List.to_binary. Closes #1144
2013-05-31 12:14:51 +03:00
meh
5ff3b760d9
Implement Regex.escape
2013-05-31 04:26:43 +02:00