1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

Add regression test for non-ambiguous constant inheritance

This commit is contained in:
Alessandro Lai 2023-04-27 22:39:52 +02:00 committed by Alessandro
parent a97b6b8a5e
commit 54531a1d31
No known key found for this signature in database
GPG Key ID: 5D9C513BE4F5798D

View File

@ -1892,6 +1892,19 @@ class ConstantTest extends TestCase
'$s===' => 'array{9223372036854775806: 0, 9223372036854775807: 1}',
],
],
'inheritedConstantIsNotAmbiguous' => [
'code' => <<<'PHP'
<?php
interface MainInterface {
public const TEST = 'test';
}
interface FooInterface extends MainInterface {}
interface BarInterface extends MainInterface {}
class FooBar implements FooInterface, BarInterface {}
PHP,
],
];
}