Skip to content
Permalink
Browse files

Seal where a mixin is given

  • Loading branch information
muglug committed Jan 3, 2020
1 parent d5d4a18 commit bf310fb326224374f93ade6fd110d167b334bb74
Showing with 7 additions and 3 deletions.
  1. +7 −3 src/Psalm/Internal/Visitor/ReflectorVisitor.php
@@ -1239,6 +1239,9 @@ function (array $l, array $r) : int {
$storage->internal = $docblock_info->internal;
$storage->psalm_internal = $docblock_info->psalm_internal;

$storage->sealed_properties = $docblock_info->sealed_properties;
$storage->sealed_methods = $docblock_info->sealed_methods;

if ($docblock_info->mixin) {
if (isset($this->class_template_types[$docblock_info->mixin])) {
if (IssueBuffer::accepts(
@@ -1253,12 +1256,13 @@ function (array $l, array $r) : int {
$docblock_info->mixin,
$this->aliases
);

// if there's a mixin, assume it's the reason for the __call
$storage->sealed_properties = true;
$storage->sealed_methods = true;
}
}

$storage->sealed_properties = $docblock_info->sealed_properties;
$storage->sealed_methods = $docblock_info->sealed_methods;

$storage->mutation_free = $docblock_info->mutation_free;
$storage->external_mutation_free = $docblock_info->external_mutation_free;

0 comments on commit bf310fb

Please sign in to comment.
You can’t perform that action at this time.