nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9edef93
)
compiler: accept intern `new` constructors (factories)
author
Jean Privat
<jean@pryen.org>
Thu, 12 Jun 2014 13:01:38 +0000
(09:01 -0400)
committer
Jean Privat
<jean@pryen.org>
Thu, 12 Jun 2014 13:01:38 +0000
(09:01 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>
src/abstract_compiler.nit
patch
|
blob
|
history
diff --git
a/src/abstract_compiler.nit
b/src/abstract_compiler.nit
index
92520bf
..
8faa8c5
100644
(file)
--- a/
src/abstract_compiler.nit
+++ b/
src/abstract_compiler.nit
@@
-1700,6
+1700,8
@@
redef class AMethPropdef
var ret = mpropdef.msignature.return_mtype
if ret != null then
ret = v.resolve_for(ret, arguments.first)
+ else if mpropdef.mproperty.is_new then
+ ret = arguments.first.mcasttype
end
if pname != "==" and pname != "!=" then
v.adapt_signature(mpropdef, arguments)