mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Fix assertion generation
This commit is contained in:
parent
5eabc2e6a9
commit
2abe76d3c2
@ -32,7 +32,10 @@ class GetClassT extends TString
|
||||
|
||||
public function getId(bool $nested = false)
|
||||
{
|
||||
return $this->as_type->isMixed() ? 'class-string' : 'class-string<' . $this->as_type->getId() . '>';
|
||||
return $this->as_type->isMixed()
|
||||
|| $this->as_type->hasObject()
|
||||
? 'class-string'
|
||||
: 'class-string<' . $this->as_type->getId() . '>';
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1125,7 +1125,6 @@ class AnalyzedMethodTest extends \Psalm\Tests\TestCase
|
||||
public function __construct(int $a, string $b) {
|
||||
echo $this->arr[$a];
|
||||
$this->b = $b;
|
||||
parent::__construct($a, $b);
|
||||
}
|
||||
}',
|
||||
getcwd() . DIRECTORY_SEPARATOR . 'AChild.php' => '<?php
|
||||
@ -1147,7 +1146,6 @@ class AnalyzedMethodTest extends \Psalm\Tests\TestCase
|
||||
public function __construct(int $a, string $b) {
|
||||
echo $this->arr[$a];
|
||||
$this->b = $b;
|
||||
parent::__construct($a, $b);
|
||||
}
|
||||
}',
|
||||
getcwd() . DIRECTORY_SEPARATOR . 'AChild.php' => '<?php
|
||||
|
Loading…
Reference in New Issue
Block a user