nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
65ac643
)
nitgg: use is_toplevel instead of heuristics to not customize top-level methods
author
Jean Privat
<jean@pryen.org>
Thu, 14 Aug 2014 00:25:12 +0000
(20:25 -0400)
committer
Jean Privat
<jean@pryen.org>
Thu, 14 Aug 2014 00:25:12 +0000
(20:25 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>
src/global_compiler.nit
patch
|
blob
|
history
diff --git
a/src/global_compiler.nit
b/src/global_compiler.nit
index
0905ca8
..
9a82243
100644
(file)
--- a/
src/global_compiler.nit
+++ b/
src/global_compiler.nit
@@
-480,7
+480,8
@@
class GlobalCompilerVisitor
do
check_valid_reciever(recvtype)
#debug("call {m} on {recvtype} on {args.first}:{args.first.mtype}")
- if m.mclassdef.mclass.name == "Object" and recvtype.ctype == "val*" then
+ if m.mproperty.is_toplevel then
+ # Do not customize top-level methods
recvtype = m.mclassdef.bound_mtype
end
return recvtype