mirror of
https://github.com/danog/psalm.git
synced 2024-11-26 20:34:47 +01:00
Fix #4509 - treat expression-derived constants as mixed
This commit is contained in:
parent
51abbc9074
commit
fbafb9e97f
@ -150,7 +150,7 @@ class ExpressionScanner
|
||||
}
|
||||
|
||||
if (($codebase->register_stub_files || $codebase->register_autoload_files)
|
||||
&& !\defined($const_name)
|
||||
&& (!\defined($const_name) || $const_type->isMixed())
|
||||
) {
|
||||
$codebase->addGlobalConstantType($const_name, $const_type);
|
||||
}
|
||||
|
@ -510,6 +510,7 @@ class StubTest extends TestCase
|
||||
$this->addFile(
|
||||
$file_path,
|
||||
'<?php
|
||||
/** @psalm-suppress MixedArgument */
|
||||
echo CODE_DIR;'
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user