src: as casts define the type of class attributes
authorAlexis Laferrière <alexis.laf@xymus.net>
Mon, 7 Dec 2015 00:38:38 +0000 (19:38 -0500)
committerAlexis Laferrière <alexis.laf@xymus.net>
Tue, 8 Dec 2015 16:26:05 +0000 (11:26 -0500)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

src/modelize/modelize_property.nit

index afd299f..b00c7f4 100644 (file)
@@ -1355,6 +1355,8 @@ redef class AAttrPropdef
                        if nexpr != null then
                                if nexpr isa ANewExpr then
                                        mtype = modelbuilder.resolve_mtype_unchecked(mmodule, mclassdef, nexpr.n_type, true)
+                               else if nexpr isa AAsCastExpr then
+                                       mtype = modelbuilder.resolve_mtype_unchecked(mmodule, mclassdef, nexpr.n_type, true)
                                else if nexpr isa AIntegerExpr then
                                        var cla: nullable MClass = null
                                        if nexpr.value isa Int then