diff --git a/src/Psalm/Type/Reconciler.php b/src/Psalm/Type/Reconciler.php index f59c127c7..2124636e8 100644 --- a/src/Psalm/Type/Reconciler.php +++ b/src/Psalm/Type/Reconciler.php @@ -481,6 +481,10 @@ class Reconciler if (strpos($base_key, '::')) { list($fq_class_name, $const_name) = explode('::', $base_key); + if (!$codebase->classlikes->classOrInterfaceExists($fq_class_name)) { + return false; + } + $class_constant = $codebase->classlikes->getConstantForClass( $fq_class_name, $const_name,