nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aa7a350
)
src: as casts define the type of class attributes
author
Alexis Laferrière
<alexis.laf@xymus.net>
Mon, 7 Dec 2015 00:38:38 +0000
(19:38 -0500)
committer
Alexis 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
patch
|
blob
|
history
diff --git
a/src/modelize/modelize_property.nit
b/src/modelize/modelize_property.nit
index
afd299f
..
b00c7f4
100644
(file)
--- a/
src/modelize/modelize_property.nit
+++ b/
src/modelize/modelize_property.nit
@@
-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