Commit Graph
4862 Commits
Author SHA1 Message Date
José Valim cb2e03688e Perform return type inference and application across local calls (#13984) 2024-11-11 23:06:31 +01:00
José Valim 485ca72ae2 Infer types and use them across remote calls (#13981)
This also unifies handling of deterministic builds with Erlang/OTP
as well as warnings_as_errors.
2024-11-09 18:00:27 +01:00
José Valim 57de6ea33a Type behaviour_info, module_info, and __info__ 2024-11-08 12:33:08 +01:00
José Valim f44aa8d710 Allow aliases and imports to be enabled conditionally in module body, closes #13975 2024-11-07 17:09:44 +01:00
José Valim 731e714b6f Define fewer modules in aliases tests 2024-11-07 13:45:11 +01:00
José Valim 3146c4a71a Simplify metadata stored in ExCk chunk
The checker only runs on functions, so there is no need
to store macros. This reduces the amount of data serialized
and stored. In Livebook, it makes the group pass run about
30% faster.
2024-11-07 13:32:43 +01:00
Jonatan Kłosko 5b221a5545 Add AST metadata about assoc operator location (#13978) 2024-11-07 10:14:38 +01:00
José Valim 9197ce51fc Handle precedence in = 2024-11-07 08:48:21 +01:00
Jonatan Kłosko 7d421b197c Add parens meta to stab operator and empty block (#13973) 2024-11-06 13:55:04 +01:00
José Valim c3dc6c86dd Detect never matching clauses and patterns (#13968) 2024-11-06 13:51:04 +01:00
Tobias Pfeiffer e28a84ce2a Fix bug with schemaless URI in URI.merge/2 (#13970)
Only occurs when mixing strings and URIs, but the docs seem to
encourage that.

Without the fix the test results in the following error:

```
  1) test merge/2 (URITest)
     test/elixir/uri_test.exs:376
     ** (KeyError) key :scheme not found in: "http://google.com/foo"

     If you are using the dot syntax, such as map.field, make sure the left-hand side of the dot is a map
     code: assert URI.merge("http://google.com/foo", URI.new!("//example.com/baz"))
     stacktrace:
       (elixir 1.18.0-dev) lib/uri.ex:911: URI.merge/2
       test/elixir/uri_test.exs:390: (test)
```

That's because that (one) particular clause didn't check for the
base to be a `%URI{}`.
2024-11-06 12:35:32 +01:00
José Valim 01474e0cd4 Type checking of try 2024-11-05 19:08:18 +01:00
Jonatan Kłosko d0f7c03744 Fix delimiter metadata for single quote atoms and remote calls (#13966) 2024-11-05 17:11:39 +01:00
Jonatan Kłosko ee90126527 Add delimiter meta to demote calls with quoted identifier (#13963) 2024-11-05 13:14:20 +01:00
José Valim 1ca06361b6 Type checking of stacktrace and error/raise functions 2024-11-05 13:13:59 +01:00
José Valim 3e9fb4d5ad Type checking of case and receive 2024-11-05 13:13:59 +01:00
José Valim 2b687fe733 Type map and struct updates (#13957) 2024-11-05 11:46:55 +01:00
Guillaume Duboc 7abcb484f8 Add tuple_values to descr (#13964) 2024-11-05 11:38:48 +01:00
José Valim 7e1aaacf53 Add more tests around list hd/tl 2024-11-04 16:58:31 +01:00
Jonatan Kłosko e54b87c181 Fix formatter adding extra escapes to remote call functions (#13960) 2024-11-04 14:37:46 +01:00
José Valim ef56e81d34 Improve coverage over union calls 2024-11-04 14:36:53 +01:00
José Valim 1557d1db5f Typecheck cond 2024-11-04 14:36:53 +01:00
Jean Klingler 5d626cb873 Improve validation of unquote_splicing AST (#13961) 2024-11-04 22:08:48 +09:00
José Valim 9bf8233f68 Improve error messages for bad funs 2024-11-04 09:31:09 +01:00
José Valim ae396c109b Type timeouts in receive 2024-11-04 09:25:15 +01:00
José Valim 9f182f9abd No longer automatically tag structs as dynamic 2024-11-03 16:05:23 +01:00
Jonatan Kłosko bd7d428ca0 Add metadata about single-expression block closing/opening (#13940) 2024-11-03 10:20:44 +01:00
Jean Klingler 322159cc7f Add test for call with thai atom (#13952) 2024-11-03 17:26:35 +09:00
Jean Klingler cc68ad91cb Add shallow validation when unquoting AST (#13950) 2024-11-03 17:20:33 +09:00
José Valim e3f017d0b2 Deal with lists inside tuples inside lists 2024-11-01 21:46:43 +01:00
José Valim 69a95a8e8c Merge empty_list and non_empty_list together on pretty printing 2024-11-01 21:03:27 +01:00
José Valim dfa733314d Properly track patterns nested in lists 2024-11-01 20:49:41 +01:00
José Valim c90bd0fca5 Ensure all variables are propagated in a bad match, closes #13946 2024-11-01 17:21:32 +01:00
José Valim f2d8064121 Do not halt streams twice in Stream.transform/5, closes #13944 2024-10-31 16:42:55 +01:00
José Valim 8c78a0ea9c Mark defguard expansion outside of guards as generated 2024-10-30 10:32:30 +01:00
José Valim e6857d5af3 Store record metadata in the documentation chunk (#13939) 2024-10-30 09:24:58 +01:00
Jonatan Kłosko 1c19c60abb Add source and behaviour information to docs chunk metadata (#13914) 2024-10-30 09:18:00 +01:00
José Valim 418ab7618a Avoid warnings during parser_test.exs suite 2024-10-30 08:31:28 +01:00
José Valim 5c29b7e73e Do not crash on preemptive errors with static atoms encoder, closes #13927 2024-10-30 08:31:06 +01:00
José Valim b5eb309e07 Fix clause rewriting in typing violations on apply 2024-10-30 07:20:25 +01:00
José Valim 4a3f61f703 Implement type checking across multiple clauses 2024-10-29 18:52:12 +01:00
José Valim 809971a690 Remove redundant warnings 2024-10-29 18:52:12 +01:00
José Valim 4b72da2e1b Add PartitionSupervisor.resize!/2 2024-10-29 09:39:58 +01:00
José Valim 1572aacb9e Add Registry.lock/3 2024-10-29 09:39:58 +01:00
José Valim 16f1917c7a Fix bug in recursive variable detection 2024-10-28 22:21:41 +01:00
José Valim 909f4ce265 Do not mention incompatible in comparison warning 2024-10-28 22:21:41 +01:00
José Valim 268bb2df93 Provide more hints on missing module message (#13933) 2024-10-28 17:26:22 +01:00
José Valim 63ed546755 Deal with maps and tuples of none 2024-10-28 12:49:34 +01:00
José Valim 50d628cc57 Fixes to descr 2024-10-28 12:33:13 +01:00
José Valim 771cfe6b9b Typing of basic arithmetic operators 2024-10-27 20:07:36 +01:00