1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 12:55:26 +01:00
Commit Graph

163 Commits

Author SHA1 Message Date
Brown
b693b726c7 Improve handling of default extended params 2019-11-14 12:12:09 -05:00
Brown
70b8df268d Fix template covariance calculation, use container covariance not inputs 2019-11-14 11:43:49 -05:00
Brown
23c37f829d Move covariant tests into their own place 2019-11-14 11:42:16 -05:00
Matthew Brown
0b1f83ff98 Fix #2346 - map covariance of templated return types when extending with more params 2019-11-14 07:45:20 -05:00
Matthew Brown
7012bedf4e Fix #2326 - substitute static more responsibly in generic objects 2019-11-12 08:01:22 -05:00
Matthew Brown
b1aae0d1a5 Fix more try/catch stuff 2019-11-12 00:52:10 -05:00
Brown
46d163996e Fix #2321 - prevent inferred template coercion 2019-11-11 09:14:34 -05:00
Brown
4e5af3490a Fix #2315 - allow Traversable->iterable templated casting 2019-11-08 13:11:01 -05:00
Brown
ac6256e645 Fix #2312, improve understanding of template replacement 2019-11-08 11:56:41 -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
Brown
64996f464e Prevent empty array workaround to #2308 2019-11-06 16:59:08 -05:00
Brown
3e98c800ec Fix #2309 - prevent closure-inferred generic template params overwriting parent ones 2019-11-06 13:13:02 -05:00
Brown
a8ed6ba9c4 Fix #2308 - prevent specialisation from bound params 2019-11-06 11:20:51 -05:00
Matthew Brown
b81a2d3852 Fix #2306 - allow nullable templated params to be compared to null 2019-11-05 18:37:46 -05:00
Brown
5c8cb37b0f Fix #2301 - do a naive projection of template params 2019-11-05 12:59:56 -05:00
Brown
4bf632bc23 Only extend covariant flag to vars without template param 2019-11-04 11:12:59 -05:00
Matthew Brown
5faebe2674 Fix templated assertion handling for static methods 2019-11-04 05:31:45 -05:00
Matthew Brown
8f421dc0bb Refactor template calculation out from Psalm\Type\Union 2019-11-03 21:27:40 -05:00
Matthew Brown
a82e35a59f Fix #2291 - extended covariant template param types should be treated as covariant 2019-11-01 18:25:07 +01:00
Matthew Brown
6517d0a5f5 Add test 2019-11-01 17:33:54 +01:00
Matthew Brown
bab7e46983 Fix #2281 - allow lists to accept list types 2019-11-01 13:35:16 +00:00
Matthew Brown
4845bbbd49 Improve solution to extended type juggling 2019-10-29 19:30:19 +00:00
Matthew Brown
8d7cdeb8ec Fix #2275 - allow extended templated types to bypass mixed type coercion rules 2019-10-29 10:07:34 +00:00
Brown
dda68228f3 Fix #2247 - don’t crash when yielding from class with too many template params 2019-10-18 11:01:16 -04:00
lhchavez
216f991b0c Normalize stringified type names (#2239)
This change makes stringified types more normalized. Concretely it sorts
all union types, reconciled types, and sorts the keys within object-like
types.
2019-10-17 01:14:33 -04:00
Brown
3f837a3493 Fix #2192 - allow static return value on templated object 2019-10-11 12:02:41 -04:00
Matthew Brown
0556f28a9f Fix #2224 - make sure literal strings are put into appropriate arrays when templating 2019-10-10 23:38:57 -04:00
Matthew Brown
c7600fde10 Fix #2217 - interpret callable self return type references properly 2019-10-09 07:40:42 -04:00
Brown
94001aad4a Fix #2208 - handle templated property types appropriately 2019-10-04 13:51:36 -04:00
Matthew Brown
4ec22cffca Fix #2184 - execute __invoke methods explicitly 2019-09-29 16:01:33 -04:00
Matthew Brown
9af8a9ac38 Fix #2181 - prevent class template types being wiped by anonymous class use 2019-09-27 12:58:32 -04:00
Brown
0972debfdd Add test for array assertion type 2019-09-26 15:57:51 -04:00
Matthew Brown
e7a69f715d Fix #2106 - add defining class to converted template 2019-09-07 13:44:47 -04:00
Matthew Brown
5d94e340ee Remove unused suppressions in tests 2019-08-18 15:34:32 -04:00
Brown
b5614d03f8 Add detection for unused function calls 2019-08-13 13:15:23 -04:00
Tyson Andre
b88fe2cfe0 Fix typos (#2003) 2019-08-11 17:13:43 -04:00
Matthew Brown
c356b579fd Prevent empty @template-extends docblock from being a fatal error
Fixes #1963
2019-07-28 16:47:06 -04:00
Matthew Brown
2c89a97f91 Fix #1970 - make sure reconciled types are templated 2019-07-25 08:33:27 -04:00
Matthew Brown
5a4a133f50 Fix #1970 - allow comparison to templated param class 2019-07-24 22:13:51 -04:00
Matthew Brown
76508e6d64 Improve behaviour of templated template assertions
Fixes #1956
2019-07-21 01:40:19 -04:00
Matthew Brown
3516b48173 Break out templated assertion tests 2019-07-21 01:10:33 -04:00
Matthew Brown
18da84c713 Fix #1937 - allow proper reconciliation on templated values 2019-07-15 01:26:08 -04:00
Brown
9aa0fd022c Fix potential coercion gotcha 2019-07-10 14:48:15 -04:00
Brown
2cb7625515 Fix #1932 - coerce empty array passed as template param to general 2019-07-10 13:54:06 -04:00
Brown
e7aadee88f Fix #1931 - narrow down property assignment 2019-07-10 13:49:11 -04:00
Brown
2c6854f403 Massage arg type after coerced param
Ref #1927
2019-07-10 12:12:51 -04:00
Brown
884a03078b Fix #1886 - derived types from templates in new calls should be coercable 2019-07-09 14:48:26 -04:00
Matthew Brown
e6bd30cc0b Allow closures to contain templated @var docblocks
Fixes #1865
2019-07-06 00:18:53 -04:00
Matthew Brown
cd33430616 Fix #1885 - allow comparison to templated class string 2019-07-05 22:57:38 -04:00