Return true
if the property was correctly created else return false
.
# Build the lazy attribute property
# Return `true` if the property was correctly created else return `false`.
fun build_lazy_property(modelbuilder: ModelBuilder, mclassdef: MClassDef): Bool
do
var mclass = mclassdef.mclass
var atlazy = self.get_single_annotation("lazy", modelbuilder)
var atlateinit = self.get_single_annotation("lateinit", modelbuilder)
if atlazy != null or atlateinit != null then
if atlazy != null and atlateinit != null then
modelbuilder.error(atlazy, "Error: `lazy` incompatible with `lateinit`.")
return false
end
if not has_value then
if atlazy != null then
modelbuilder.error(atlazy, "Error: `lazy` attributes need a value.")
else if atlateinit != null then
modelbuilder.error(atlateinit, "Error: `lateinit` attributes need a value.")
end
has_value = true
return false
end
create_lazy
end
return true
end
src/modelize/modelize_property.nit:1397,2--1422,4