1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-04 02:27:59 +01:00
Commit Graph

90 Commits

Author SHA1 Message Date
Matthew Brown
42bafc1e64 Fix #1775 - allow true|false to be accepted as bool 2019-06-13 08:55:36 -04:00
Brown
9c4599a0f0 Add better support for inheriting docblocks 2019-06-11 11:19:57 -04:00
Brown
7cf8c362f0 Fix #1766 - interpret interface parent extends properly 2019-06-11 10:49:39 -04:00
Matthew Brown
395057c6df Fix #1738 - constrain template type when class-string<T> is a param 2019-06-08 11:08:08 -04:00
Matthew Brown
42cc201e9e Fix #1698 - better understand inherited docblock return types 2019-06-08 09:44:22 -04:00
Matthew Brown
b0678bdc74 Improve treatment of key-of
Ref #1698
2019-06-07 21:27:50 -04:00
Matthew Brown
2fa0f27872 Prevent LessSpecificImplementedReturnType with extended template 2019-06-07 18:42:26 -04:00
Brown
2f29dcce93 Fix #1728 - remove extra data in template-extends annotation 2019-06-03 10:28:54 -04:00
Brown
b19d256b14 Add better error message for templated key-of param 2019-05-28 14:23:22 -04:00
Brown
a89892a41f Prevent more broad template types being captured 2019-05-28 11:54:07 -04:00
Brown
cf02e9c22c Fix access on matched T[K] 2019-05-27 18:36:34 -04:00
Matthew Brown
052599192a Fix #1680 - narrow nullable templated matching 2019-05-25 12:44:47 -04:00
Matthew Brown
9fb96793cd Fix #1676 - don’t modify original param types with templated by-reference 2019-05-24 18:17:48 -04:00
Matthew Brown
62dacaf97b Also replace templated intersection types that aren’t direct templates
Ref #1675
2019-05-24 17:34:40 -04:00
Matthew Brown
7a48225184 Fix leaky template type 2019-05-24 13:35:14 -04:00
Matthew Brown
3e2b7163ca Fix #1674 - treat intersections more equally regardless of order 2019-05-24 12:48:37 -04:00
Matthew Brown
9e3724bb0c Prevent class-string<T> from assigning unknown type to mixed
Fixes #1672
2019-05-24 10:20:37 -04:00
Matthew Brown
c80f9d8ecd Add class-based support for key-of
Ref #762
2019-05-24 02:12:58 -04:00
Matthew Brown
574545e149 Add initial support for key-of<T>
Ref #762
2019-05-23 23:53:48 -04:00
Brown
56daa390fc Allow array access on @template T as array
Ref #1607
2019-05-23 18:06:22 -04:00
Brown
1c30270d89 Remove 7.4 syntax 2019-05-23 13:55:55 -04:00
Brown
888776cebd Fix duplicate test 2019-05-23 13:10:23 -04:00
Brown
034ea725e8 Coerce generic types from empty 2019-05-21 12:12:13 -04:00
Matthew Brown
ec2ee04fe8 Allow coercion from empty to array param 2019-05-21 12:12:13 -04:00
Brown
4035823d51 Fix #1652 - allow totally-templated intersections 2019-05-17 15:40:52 -04:00
Brown
4a434d9a2f Add separate issue for undefined classes in docblocks 2019-05-15 18:41:26 -04:00
Brown
f1d8b1e6e7 Prevent extending covariant template params
Fixes #1610
2019-05-14 18:51:30 -04:00
Brown
7fbbe964cb Fix #1609 - warn when using covariant template type as input 2019-05-14 18:17:38 -04:00
Brown
b7529e872b Consider intersections when combining generic types 2019-05-08 13:23:47 -04:00
Matthew Brown
4f8d6a50d8 Don’t emit MissingClosureReturnType when inside call and type can be inferred 2019-05-06 20:47:55 -04:00
Brown
fec1a60e90 Ref #1600 - partial fix inferring param types when none is available 2019-05-06 18:44:10 -04:00
Brown
751253ddf0 Fix #1603 - prevent invalid covariant template classes from being passed 2019-05-06 16:38:08 -04:00
Matthew Brown
ae531506de Fix #1591 - allow variable typed to string to be compared to literal in reverse order 2019-05-02 00:50:35 -04:00
Matthew Brown
59e53acd56 Fix new template class array key coercion to mixed - when we don’t know, assume bottom type 2019-04-26 07:54:21 -04:00
Brown
0e4c8ce482 Split apart TypeCoercion issues, allowing more granular issue filtering 2019-04-25 18:02:19 -04:00
Brown
1348d634ed Improve handling of variadic parameters 2019-04-09 13:58:49 -04:00
Matthew Brown
230680fd1c Fix #1513 - use correct param types when examining abstract trait methods 2019-03-28 22:47:17 -04:00
Brown
937eb42e8b Do not override parent return type 2019-03-28 10:43:49 -04:00
Brown
c022d49b1a Allow coercion from templated param to false 2019-03-28 10:19:02 -04:00
Brown
783f028f70 Fix #1498 - use template types from parent function 2019-03-25 11:25:43 -04:00
Matthew Brown
c772914910 Add some formatting 2019-03-23 14:27:54 -04:00
Brown
22fc0b5aa3 Fix #1482 - don’t substitute template params when no default present 2019-03-22 18:05:45 -04:00
Brown
cc568422d8 Fix #1488 - allow inheritance when dummy template exists 2019-03-22 16:29:30 -04:00
Brown
b9ba24929d Refactor storage of template names to prevent clashes 2019-03-22 15:59:10 -04:00
Brown
29666bf22e Fix #1489 - make sure you’re checking against known params 2019-03-21 18:28:25 -04:00
Brown
8ed5e661a4 Catch object passed to array-key 2019-03-19 11:43:37 -04:00
Matthew Brown
4865f66aeb Allow better comparisons for templated types 2019-03-17 18:52:42 -04:00
Matthew Brown
9ee4a7414b Fix #1461 - check interfaces when analysing abstract method call 2019-03-17 14:16:52 -04:00
Matthew Brown
ca765cba58 Fix errors caused by bad generic param counts
Fixes #1474
2019-03-17 12:20:57 -04:00
Matthew Brown
f5c6abb6a0 Allow capturing of class-string<T>
Fixes #1457
2019-03-17 10:19:15 -04:00