@@ -1497,6 +1497,60 @@ public function dataUnion(): array
1497
1497
MixedType::class,
1498
1498
'mixed=implicit ' ,
1499
1499
],
1500
+ [
1501
+ [
1502
+ TemplateTypeFactory::create (
1503
+ TemplateTypeScope::createWithFunction ('a ' ),
1504
+ 'T ' ,
1505
+ null ,
1506
+ TemplateTypeVariance::createInvariant ()
1507
+ ),
1508
+ TemplateTypeFactory::create (
1509
+ TemplateTypeScope::createWithFunction ('a ' ),
1510
+ 'K ' ,
1511
+ null ,
1512
+ TemplateTypeVariance::createInvariant ()
1513
+ ),
1514
+ ],
1515
+ UnionType::class,
1516
+ 'K (function a(), parameter)|T (function a(), parameter) ' ,
1517
+ ],
1518
+ [
1519
+ [
1520
+ TemplateTypeFactory::create (
1521
+ TemplateTypeScope::createWithFunction ('a ' ),
1522
+ 'T ' ,
1523
+ new ObjectWithoutClassType (),
1524
+ TemplateTypeVariance::createInvariant ()
1525
+ ),
1526
+ TemplateTypeFactory::create (
1527
+ TemplateTypeScope::createWithFunction ('a ' ),
1528
+ 'K ' ,
1529
+ new ObjectWithoutClassType (),
1530
+ TemplateTypeVariance::createInvariant ()
1531
+ ),
1532
+ ],
1533
+ UnionType::class,
1534
+ 'K of object (function a(), parameter)|T of object (function a(), parameter) ' ,
1535
+ ],
1536
+ [
1537
+ [
1538
+ TemplateTypeFactory::create (
1539
+ TemplateTypeScope::createWithFunction ('a ' ),
1540
+ 'T ' ,
1541
+ new ObjectType (\Exception::class),
1542
+ TemplateTypeVariance::createInvariant ()
1543
+ ),
1544
+ TemplateTypeFactory::create (
1545
+ TemplateTypeScope::createWithFunction ('a ' ),
1546
+ 'K ' ,
1547
+ new ObjectType (\stdClass::class),
1548
+ TemplateTypeVariance::createInvariant ()
1549
+ ),
1550
+ ],
1551
+ UnionType::class,
1552
+ 'K of stdClass (function a(), parameter)|T of Exception (function a(), parameter) ' ,
1553
+ ],
1500
1554
];
1501
1555
}
1502
1556
0 commit comments