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:
parent
a97b6b8a5e
commit
54531a1d31
@ -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,
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user