nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rta: store real types in live_cast_type
[nit.git]
/
src
/
typing.nit
diff --git
a/src/typing.nit
b/src/typing.nit
index
c760c74
..
719fae2
100644
(file)
--- a/
src/typing.nit
+++ b/
src/typing.nit
@@
-640,9
+640,6
@@
redef class AVarAssignExpr
end
redef class AReassignFormExpr
end
redef class AReassignFormExpr
- # @depreciated use `reassign_callsite`
- fun reassign_property: nullable MMethodDef do return self.reassign_callsite.mpropdef
-
# The method designed by the reassign operator.
var reassign_callsite: nullable CallSite
# The method designed by the reassign operator.
var reassign_callsite: nullable CallSite
@@
-1190,9
+1187,6
@@
end
## MESSAGE SENDING AND PROPERTY
redef class ASendExpr
## MESSAGE SENDING AND PROPERTY
redef class ASendExpr
- # @depreciated: use `callsite`
- fun mproperty: nullable MMethod do return callsite.mproperty
-
# The property invoked by the send.
var callsite: nullable CallSite
# The property invoked by the send.
var callsite: nullable CallSite
@@
-1353,9
+1347,6
@@
redef class ABraAssignExpr
end
redef class ASendReassignFormExpr
end
redef class ASendReassignFormExpr
- # @depreciated use `write_callsite`
- fun write_mproperty: nullable MMethod do return write_callsite.mproperty
-
# The property invoked for the writing
var write_callsite: nullable CallSite
# The property invoked for the writing
var write_callsite: nullable CallSite
@@
-1426,7
+1417,7
@@
end
redef class ASuperExpr
# The method to call if the super is in fact a 'super init call'
# Note: if the super is a normal call-next-method, then this attribute is null
redef class ASuperExpr
# The method to call if the super is in fact a 'super init call'
# Note: if the super is a normal call-next-method, then this attribute is null
- var mproperty: nullable MMethod
+ var callsite: nullable CallSite
redef fun accept_typing(v)
do
redef fun accept_typing(v)
do
@@
-1447,7
+1438,6
@@
redef class ASuperExpr
end
# FIXME: covariance of return type in linear extension?
var superprop = superprops.first
end
# FIXME: covariance of return type in linear extension?
var superprop = superprops.first
- assert superprop isa MMethodDef
var msignature = v.resolve_signature_for(superprop, recvtype, true)
var args = self.n_args.to_a
var msignature = v.resolve_signature_for(superprop, recvtype, true)
var args = self.n_args.to_a
@@
-1491,12
+1481,14
@@
redef class ASuperExpr
v.error(self, "Error: No super method to call for {mproperty}.")
return
end
v.error(self, "Error: No super method to call for {mproperty}.")
return
end
- self.mproperty = superprop.mproperty
- var args = self.n_args.to_a
var msignature = v.resolve_signature_for(superprop, recvtype, true)
var msignature = v.resolve_signature_for(superprop, recvtype, true)
+ var callsite = new CallSite(self, recvtype, true, superprop.mproperty, superprop, msignature, false)
+ self.callsite = callsite
+
+ var args = self.n_args.to_a
if args.length > 0 then
if args.length > 0 then
- v.check_signature(self, args, mproperty.name, msignature)
+ callsite.check_signature(v, args)
else
# TODO: Check signature
end
else
# TODO: Check signature
end
@@
-1508,9
+1500,6
@@
end
####
redef class ANewExpr
####
redef class ANewExpr
- # @depreciated use `callsite`
- fun mproperty: nullable MMethod do return self.callsite.mproperty
-
# The constructor invoked by the new.
var callsite: nullable CallSite
# The constructor invoked by the new.
var callsite: nullable CallSite