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:
parent
822e840d0c
commit
020430c66f
@ -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'
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user