summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
87df737)
Signed-off-by: Jean Privat <jean@pryen.org>
compiler.do_property_coloring
for m in mainmodule.in_importation.greaters do
for mclass in m.intro_mclasses do
compiler.do_property_coloring
for m in mainmodule.in_importation.greaters do
for mclass in m.intro_mclasses do
- if mclass.kind == abstract_kind or mclass.kind == interface_kind then continue
+ #if mclass.kind == abstract_kind or mclass.kind == interface_kind then continue
compiler.compile_class_to_c(mclass)
end
end
compiler.compile_class_to_c(mclass)
end
end
var v = self.new_visitor
var rta = runtime_type_analysis
var v = self.new_visitor
var rta = runtime_type_analysis
- var is_dead = mclass.kind == abstract_kind or mclass.kind == interface_kind
+ var is_dead = false # mclass.kind == abstract_kind or mclass.kind == interface_kind
if not is_dead and rta != null and not rta.live_classes.has(mclass) and mtype.ctype == "val*" and mclass.name != "NativeArray" then
is_dead = true
end
if not is_dead and rta != null and not rta.live_classes.has(mclass) and mtype.ctype == "val*" and mclass.name != "NativeArray" then
is_dead = true
end
v.error(self, "Type error: cannot instantiate the formal type {recvtype}.")
return
end
v.error(self, "Type error: cannot instantiate the formal type {recvtype}.")
return
end
- else
- if recvtype.mclass.kind == abstract_kind then
- v.error(self, "Cannot instantiate abstract class {recvtype}.")
- return
- else if recvtype.mclass.kind == interface_kind then
- v.error(self, "Cannot instantiate interface {recvtype}.")
- return
- end
end
self.recvtype = recvtype
end
self.recvtype = recvtype
if callsite == null then return
if not callsite.mproperty.is_new then
if callsite == null then return
if not callsite.mproperty.is_new then
+ if recvtype.mclass.kind == abstract_kind then
+ v.error(self, "Cannot instantiate abstract class {recvtype}.")
+ return
+ else if recvtype.mclass.kind == interface_kind then
+ v.error(self, "Cannot instantiate interface {recvtype}.")
+ return
+ end
self.mtype = recvtype
else
self.mtype = callsite.msignature.return_mtype
self.mtype = recvtype
else
self.mtype = callsite.msignature.return_mtype