summary refs log tree commit diff stats
path: root/compiler/cgen.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-03-02 23:46:20 +0100
committerAraq <rumpf_a@web.de>2014-03-02 23:46:20 +0100
commit614557994ec6143e20c1f2534f0a6fa87ca4c0c4 (patch)
tree051c6f03d994efa16aaf6c29e31bbc6044be03d7 /compiler/cgen.nim
parentc55f5b34ee4d3c44c21b17c93e8d38dd867fb9cc (diff)
downloadNim-614557994ec6143e20c1f2534f0a6fa87ca4c0c4.tar.gz
the compiler is now aware of packages
Diffstat (limited to 'compiler/cgen.nim')
-rw-r--r--compiler/cgen.nim4
1 files changed, 3 insertions, 1 deletions
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
   
9'>149 150 151 152 153 154 155 156