From 614557994ec6143e20c1f2534f0a6fa87ca4c0c4 Mon Sep 17 00:00:00 2001 From: Araq Date: Sun, 2 Mar 2014 23:46:20 +0100 Subject: the compiler is now aware of packages --- compiler/cgen.nim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'compiler/cgen.nim') diff --git a/compiler/cgen.nim b/compiler/cgen.nim index 8da753d04..c3a28527e 100644 --- a/compiler/cgen.nim +++ b/compiler/cgen.nim @@ -1044,8 +1044,10 @@ proc genMainProc(m: BModule) = appcg(m, m.s[cfsProcs], otherMain, []) proc getSomeInitName(m: PSym, suffix: string): PRope = + assert m.kind == skModule + assert m.owner.kind == skPackage if {sfSystemModule, sfMainModule} * m.flags == {}: - result = m.info.toFullPath.getPackageName.mangle.toRope + result = m.owner.name.s.mangle.toRope result.app m.name.s result.app suffix -- cgit 1.4.1-2-gfad0