Creation of a new method (AST and model representation) with the given MMethod.

Take care, if is_abstract == false the AMethPropdef returned has an empty body (potential error if the given signature has an return type).

Property definitions

nitc :: astbuilder $ ModelBuilder :: create_method_from_property
	# Creation of a new method (AST and model representation) with the given MMethod.
	# Take care, if `is_abstract == false` the AMethPropdef returned has an empty body (potential error if the given signature has an return type).
	fun create_method_from_property(mproperty: MMethod,  mclassdef: MClassDef, is_abstract: Bool, msignature: nullable MSignature): AMethPropdef do
		var m_def = new MMethodDef(mclassdef, mproperty, mclassdef.location)

		if msignature == null then msignature = new MSignature(new Array[MParameter])

		m_def.msignature = msignature
		m_def.is_abstract = true
		var n_def = m_def.create_ast_representation
		# Association new npropdef to mpropdef
		unsafe_add_mpropdef2npropdef(m_def,n_def)

		if not is_abstract then
			n_def.mpropdef.is_abstract = false
			n_def.n_block = new ABlockExpr.make
		end

		return n_def
	end
src/astbuilder.nit:1054,2--1073,4