Matt Brown
|
99da1daae5
|
Fix #4958 - honour template as inheritance when comparing template types
|
2021-01-29 11:47:29 +01:00 |
|
Matt Brown
|
387abc1cb6
|
Fix #4943
Prevent input types becoming part of the inferred generic params when a match is found
|
2021-01-29 11:47:29 +01:00 |
|
Matt Brown
|
fb5ee1e46d
|
Bind lower bounds to upper bounds as well when no upper bound can be inferred
Ref #4485
|
2021-01-29 11:46:08 +01:00 |
|
Matt Brown
|
ab90097baf
|
Remove subpar test
|
2021-01-29 11:44:35 +01:00 |
|
Matt Brown
|
7f975045f4
|
Fix #4422 - be aware of nested template params
|
2021-01-29 11:44:33 +01:00 |
|
Matt Brown
|
63953d5676
|
4.x - refactor unused variable detection
This turns unused variable detection into an explicit control-flow problem, where before we had a more simplistic mark-and-sweep algorithm
|
2021-01-29 11:39:44 +01:00 |
|
orklah
|
db45ff1ba4
|
More return types (#4173)
* add native return types
* redundant phpdoc
|
2021-01-29 11:38:57 +01:00 |
|
Brown
|
568cbfb1be
|
Fix tests
|
2021-01-29 11:38:56 +01:00 |
|
Brown
|
11ee00442d
|
Refine iterable key after is_array check
Ref #4038
|
2021-01-29 11:38:46 +01:00 |
|
Brown
|
a0a9c9b7bc
|
Fix #4038 - don’t remove null types unnecessarily in mixed union
|
2021-01-29 11:38:45 +01:00 |
|
Matthew Brown
|
5c20a5295e
|
Improve solution to #3964
|
2020-08-16 13:03:30 -04:00 |
|
Matthew Brown
|
a356a43a51
|
Fix #3964 - prevent incorrect intersection of unions
|
2020-08-16 12:26:07 -04:00 |
|
Matthew Brown
|
6085e42fc1
|
Detect mismatching param names effectively
|
2020-08-10 09:58:43 -04:00 |
|
Brown
|
afce2dc66f
|
Tighten up rules around instantiation a bit more
|
2020-08-06 10:18:55 -04:00 |
|
Brown
|
c0b0036109
|
Fix #3934 - prevent unsafe use of new static
|
2020-08-05 19:39:27 -04:00 |
|
Brown
|
6419788a49
|
Remove false from template param as necessary
Fixes #3737
|
2020-07-03 01:07:50 -04:00 |
|
Brown
|
3da3d61270
|
Fix #3434 by removing extraneous call to simplifyType
|
2020-05-26 17:55:54 -04:00 |
|
Brown
|
bebfac0ab6
|
Fix #3426 - allow falsy reconciliation for templated params
|
2020-05-22 13:16:48 -04:00 |
|
Matthew Brown
|
4dd0a2b775
|
Fix #3380 - allow comparisons between template param and empty array
|
2020-05-16 16:41:07 -04:00 |
|
Brown
|
8f57d0c738
|
Fix #3204 - normalise function ids where possible
|
2020-04-20 21:38:35 -04:00 |
|
Valentin Udaltsov
|
9b8e8ab964
|
Support non-empty-arrays in array_keys (#3168)
Closes #3160
|
2020-04-18 00:56:54 -04:00 |
|
Matthew Brown
|
aa29c7fc9e
|
Revert "Support non-empty-arrays in array_keys (#3168)" (#3172)
This reverts commit a280e57ecf .
|
2020-04-17 16:52:08 -04:00 |
|
Valentin Udaltsov
|
a280e57ecf
|
Support non-empty-arrays in array_keys (#3168)
Closes #3160
|
2020-04-17 15:07:41 -04:00 |
|
Brown
|
a117c48bb2
|
Add back nuance to error messages for conflicting type bounds
|
2020-04-08 12:37:46 -04:00 |
|
Brown
|
067104e170
|
Fix #3084 - keep track of upper and lower bounds of inferred template types
|
2020-04-07 00:13:56 -04:00 |
|
Brown
|
387bc02e71
|
Fix #3082 - merge intersection types when replacing template types
|
2020-04-06 10:19:36 -04:00 |
|
Brown
|
aca84e6f96
|
Fix inconsistency in partial template matching
|
2020-04-05 18:40:25 -04:00 |
|
Brown
|
1bf1a6e46b
|
Accept partial match of template type
|
2020-04-04 17:14:33 -04:00 |
|
Matthew Brown
|
520db22929
|
We can infer this type now
|
2020-03-11 15:43:44 -04:00 |
|
Matthew Brown
|
1062591eec
|
Fix broken test
|
2020-03-11 13:44:08 -04:00 |
|
Matthew Brown
|
e0d555e203
|
Allow function names to passed in as strings for callable template resolution
|
2020-02-29 15:43:45 -05:00 |
|
Matthew Brown
|
1f19aed31b
|
Fix support for replacing mocked types in own classes
|
2020-02-27 21:36:03 -05:00 |
|
Brown
|
35c1670602
|
Fix #2875 - treat intersections more similarly than before
|
2020-02-27 18:42:15 -05:00 |
|
Matthew Brown
|
746f8d4973
|
Prevent returning named object where template return assumed
|
2020-02-24 23:14:16 -05:00 |
|
Brown
|
f4485cc529
|
Fix #2847 - use fully-qualified function name
|
2020-02-21 16:44:31 -05:00 |
|
Brown
|
b51863fc9b
|
Fix #2848 - allow casting templated types
|
2020-02-21 15:17:35 -05:00 |
|
Matthew Brown
|
9bdca3c706
|
Forbid array<mixed, ...>
|
2020-02-21 01:26:51 -05:00 |
|
Matthew Brown
|
00afcda5e0
|
Fix #2824 - allow unpacking of non-arrays with template params
|
2020-02-17 19:54:11 -05:00 |
|
Matthew Brown
|
8db4bc7691
|
Improve formatting of intersection error messages
Also reduce false positives on intersections of templates
|
2020-02-02 12:25:24 -05:00 |
|
Brown
|
216d9256a1
|
Allow templated array_map callable inference
Fixes #2719
|
2020-01-30 17:13:46 -05:00 |
|
Matthew Brown
|
55c2f7faa2
|
Fix #2508 - don’t replace templated types with generic ones inside own function
|
2019-12-28 18:38:02 -05:00 |
|
Matthew Brown
|
f40b6625eb
|
Fix #2431 - allow null in template defaults
|
2019-12-13 21:40:09 -05:00 |
|
Matthew Brown
|
517aaac851
|
Fix #2432 - narrow template type after is_object check
|
2019-12-08 21:40:15 -05:00 |
|
Matthew Brown
|
d6a731be73
|
Fix #2441 - add error when @template type is missing
|
2019-12-08 21:19:29 -05:00 |
|
Matthew Brown
|
27c9aa4286
|
Fix code and test
|
2019-12-01 10:43:51 -05:00 |
|
Matthew Brown
|
f21150b8ad
|
Fix #2384 - fix resolution of @param-out template types
|
2019-12-01 10:40:53 -05:00 |
|
Matthew Brown
|
b1aae0d1a5
|
Fix more try/catch stuff
|
2019-11-12 00:52:10 -05:00 |
|
Brown
|
3d7b34e7f6
|
Fix #2273 - ensure all template params are bound
|
2019-11-07 11:03:41 -05:00 |
|
Brown
|
86b6801066
|
Fix #2294 - detect invalid callble due to __invoke
|
2019-11-07 09:39:24 -05:00 |
|
Matthew Brown
|
8f421dc0bb
|
Refactor template calculation out from Psalm\Type\Union
|
2019-11-03 21:27:40 -05:00 |
|