nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
typing: ANew distinguish the type of the class and the returned type
[nit.git]
/
src
/
compiler
/
abstract_compiler.nit
diff --git
a/src/compiler/abstract_compiler.nit
b/src/compiler/abstract_compiler.nit
index
50f3c8e
..
c785dd6
100644
(file)
--- a/
src/compiler/abstract_compiler.nit
+++ b/
src/compiler/abstract_compiler.nit
@@
-2898,7
+2898,8
@@
end
redef class ANewExpr
redef fun expr(v)
do
- var mtype = self.mtype.as(MClassType)
+ var mtype = self.recvtype
+ assert mtype != null
var recv
var ctype = mtype.ctype
if mtype.mclass.name == "NativeArray" then