X-Git-Url: http://nitlanguage.org diff --git a/src/analysis/cha_analysis.nit b/src/analysis/cha_analysis.nit index ed2a120..2d9cd0f 100644 --- a/src/analysis/cha_analysis.nit +++ b/src/analysis/cha_analysis.nit @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# This package implements Class Hierarchy Analysis (CHA) +# This module implements Class Hierarchy Analysis (CHA) package cha_analysis import reachable_method_analysis @@ -99,7 +99,7 @@ special ICodeVisitor else if ic isa INew then # FIXME: take only the last property on the redef. hierarchie var t = ic.stype - var cls = t.for_module(builder.program.module).local_class + var cls = t.for_module(builder.program.main_module).local_class var m = cls[ic.property.global].as(MMMethod) var r = cls.new_instance_iroutine[m] builder.add_search(ic.property, r, false, false) @@ -109,12 +109,12 @@ special ICodeVisitor builder.add_search(ic.property, ic.property.iroutine, false, false) else if ic isa ICheckInstance then var t = ic.stype - var cls = t.for_module(builder.program.module).local_class + var cls = t.for_module(builder.program.main_module).local_class var ir = cls.checknew_iroutine builder.add_search(null, ir, true, false) else if ic isa IInitAttributes then var t = ic.stype - var cls = t.for_module(builder.program.module).local_class + var cls = t.for_module(builder.program.main_module).local_class var ir = cls.init_var_iroutine builder.add_search(null, ir, true, false) end