nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
src: use MFormalType for type checks when it makes sense
[nit.git]
/
src
/
vm
/
virtual_machine.nit
diff --git
a/src/vm/virtual_machine.nit
b/src/vm/virtual_machine.nit
index
b33e7f8
..
9c3d516
100644
(file)
--- a/
src/vm/virtual_machine.nit
+++ b/
src/vm/virtual_machine.nit
@@
-61,10
+61,10
@@
class VirtualMachine super NaiveInterpreter
var anchor = self.frame.arguments.first.mtype.as(MClassType)
# `sub` or `sup` are formal or virtual types, resolve them to concrete types
var anchor = self.frame.arguments.first.mtype.as(MClassType)
# `sub` or `sup` are formal or virtual types, resolve them to concrete types
- if sub isa MParameterType or sub isa MVirtualType then
+ if sub isa MFormalType then
sub = sub.resolve_for(anchor.mclass.mclass_type, anchor, mainmodule, false)
end
sub = sub.resolve_for(anchor.mclass.mclass_type, anchor, mainmodule, false)
end
- if sup isa MParameterType or sup isa MVirtualType then
+ if sup isa MFormalType then
sup = sup.resolve_for(anchor.mclass.mclass_type, anchor, mainmodule, false)
end
sup = sup.resolve_for(anchor.mclass.mclass_type, anchor, mainmodule, false)
end
@@
-87,7
+87,7
@@
class VirtualMachine super NaiveInterpreter
end
# Now the case of direct null and nullable is over
end
# Now the case of direct null and nullable is over
- if sub isa MParameterType or sub isa MVirtualType then
+ if sub isa MFormalType then
sub = sub.anchor_to(mainmodule, anchor)
# Manage the second layer of null/nullable
if sub isa MNullableType then
sub = sub.anchor_to(mainmodule, anchor)
# Manage the second layer of null/nullable
if sub isa MNullableType then