public function setReferencedType(PhpType $type)
 {
     if (!$type->isObjectType()) {
         throw new \LogicException('The referenced type must be an object type.');
     }
     if ($type->isNoObjectType()) {
         throw new \LogicException('The referenced type must not be the generic object type.');
     }
     parent::setReferencedType($type);
     $this->resolved = true;
 }
 public function testForEquality(PhpType $that)
 {
     if ($this->isNoResolvedType() && ($that->isObjectType() || $that->isNoObjectType())) {
         return TernaryValue::get('unknown');
     }
     return $this->referencedType->testForEquality($that);
 }