nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f4d434e
)
typing: `new`-fatories are like top-level methods
author
Jean Privat
<jean@pryen.org>
Thu, 23 Oct 2014 01:48:05 +0000
(21:48 -0400)
committer
Jean Privat
<jean@pryen.org>
Thu, 23 Oct 2014 17:02:32 +0000
(13:02 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>
src/semantize/typing.nit
patch
|
blob
|
history
diff --git
a/src/semantize/typing.nit
b/src/semantize/typing.nit
index
83bebc2
..
13b36b6
100644
(file)
--- a/
src/semantize/typing.nit
+++ b/
src/semantize/typing.nit
@@
-72,7
+72,7
@@
private class TypeVisitor
selfvariable.declared_type = mclass.mclass_type
var mprop = mpropdef.mproperty
- if mprop isa MMethod and mprop.is_toplevel then
+ if mprop isa MMethod and (mprop.is_toplevel or mprop.is_new) then
is_toplevel_context = true
end
end