1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00

Recover better from union type errors in template names

This commit is contained in:
Matthew Brown 2019-02-05 17:43:46 -05:00
parent 822e840d0c
commit 020430c66f

View File

@ -2018,7 +2018,7 @@ class TemplateTest extends TestCase
$templated_list->add(5, []);',
'error_message' => 'InvalidArgument',
],
'unionTemplateType' => [
'classTemplateUnionType' => [
'<?php
/**
* @template T0 as int|string
@ -2026,6 +2026,14 @@ class TemplateTest extends TestCase
class Foo {}',
'error_message' => 'InvalidDocblock'
],
'functionTemplateUnionType' => [
'<?php
/**
* @template T0 as int|string
*/
function foo() : void {}',
'error_message' => 'InvalidDocblock'
],
];
}
}