nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
typing: remove most top-level things
[nit.git]
/
src
/
semantize
/
typing.nit
diff --git
a/src/semantize/typing.nit
b/src/semantize/typing.nit
index
ce51fa3
..
940f67e
100644
(file)
--- a/
src/semantize/typing.nit
+++ b/
src/semantize/typing.nit
@@
-52,6
+52,7
@@
private class TypeVisitor
# Is `self` use restricted?
# * no explicit `self`
# * method called on the implicit self must be top-level
# Is `self` use restricted?
# * no explicit `self`
# * method called on the implicit self must be top-level
+ # Currently only used for `new` factory since there is no valid receiver inside
var is_toplevel_context = false
init
var is_toplevel_context = false
init
@@
-71,7
+72,7
@@
private class TypeVisitor
selfvariable.declared_type = mclass.mclass_type
var mprop = mpropdef.mproperty
selfvariable.declared_type = mclass.mclass_type
var mprop = mpropdef.mproperty
- if mprop isa MMethod and (mprop.is_toplevel or mprop.is_new) then
+ if mprop isa MMethod and mprop.is_new then
is_toplevel_context = true
end
end
is_toplevel_context = true
end
end