Determine the reassign_property

readtype is the type of the reading of the left value. writetype is the type of the writing of the left value. (Because of ACallReassignExpr, both can be different. Return the static type of the value to store.

Property definitions

nitc :: typing $ AReassignFormExpr :: resolve_reassignment
	# Determine the `reassign_property`
	# `readtype` is the type of the reading of the left value.
	# `writetype` is the type of the writing of the left value.
	# (Because of `ACallReassignExpr`, both can be different.
	# Return the static type of the value to store.
	private fun resolve_reassignment(v: TypeVisitor, readtype, writetype: MType): nullable MType
	do
		var reassign_name = self.n_assign_op.operator

		self.read_type = readtype

		var callsite = v.build_callsite_by_name(self.n_assign_op, readtype, reassign_name, false)
		if callsite == null then return null # Skip error
		self.reassign_callsite = callsite

		var msignature = callsite.msignature
		var rettype = msignature.return_mtype
		assert msignature.arity == 1 and rettype != null

		var value_type = v.visit_expr_subtype(self.n_value, msignature.mparameters.first.mtype)
		if value_type == null then return null # Skip error

		v.check_subtype(self, rettype, writetype, false)
		return rettype
	end
src/semantize/typing.nit:1155,2--1179,4