mirror of
https://github.com/danog/psalm.git
synced 2025-01-22 05:41:20 +01:00
added test for multiline templates (#5282)
This commit is contained in:
parent
ed6fdaaca9
commit
fff32d0443
@ -3322,6 +3322,27 @@ class ClassTemplateTest extends TestCase
|
||||
takesA($a);
|
||||
}',
|
||||
],
|
||||
'templateIsAComplexMultilineType' => [
|
||||
'<?php
|
||||
/**
|
||||
* @template T of array{
|
||||
* a: string,
|
||||
* b: int
|
||||
* }
|
||||
*/
|
||||
class MyContainer {
|
||||
/** @var T */
|
||||
private $value;
|
||||
/** @param T $value */
|
||||
public function __construct($value) {
|
||||
$this->value = $value;
|
||||
}
|
||||
/** @return T */
|
||||
public function getValue() {
|
||||
return $this->value;
|
||||
}
|
||||
}'
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user