code: def assign_value(self, comp_def, value, src_ref):
          
  
          # Check if property is allowed in this component
          if type(comp_def) not in self.bindable_to:
              self.env.msg.fatal(
                  "The property '%s' is not valid for '%s' components"
                  % (self.get_name(), type(comp_def).__name__.lower()),
                  src_ref
              )
  
          # Property assignments with no rhs show up as None here
          # For built-in properties, this implies a True value
          if value is None:
              value = True
  
          # unpack true type of value
          # Contents of value can be:
          #   - An expression (instance of an Expr subclass)
          #   - Direct assignment of a type-compatible value
          if isinstance(value, expressions.Expr):
              # Predict expected type after value would get evaluated
              assign_type = value.predict_type()
          elif rdltypes.is_user_enum(value):
              # Value is a user enum type derived from UserEnum.
              # Mark it as such
              assign_type = rdltypes.UserEnum
          else:
              # Value is already evaluated
              assign_type = type(value)
  
          # Check if value's type is compatible
          for valid_type in self.valid_types:
              if expressions.is_castable(assign_type, valid_type):
                  break
          else:
              self.env.msg.fatal(
                  "Incompatible assignment to property '%s'" % self.get_name(),
                  src_ref
              )
  
          # Store the property
          comp_def.properties[self.get_name()] = value
docs: Used by the compiler for either local or dynamic prop assignments
          This does the following:
              - Check that the property is allowed in this component
              - Check if the value being assigned is compatible
              - Assign the property, as well as any side-effects
                  subclasses extend this to define prop-specific side-effects