Skip to content

Commit 3da1f69

Browse files
committed
Handle import * via generated grumpy.LoadMembers() Go code
1 parent 06a8fd2 commit 3da1f69

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • grumpy-tools-src/grumpy_tools/compiler

grumpy-tools-src/grumpy_tools/compiler/stmt.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,8 @@ def _import_and_bind(self, imp):
629629
self.writer.write('{} = {}[{}]'.format(
630630
mod.name, mod_slice.expr, binding.value))
631631
self.block.bind_var(self.writer, binding.alias, mod.expr)
632+
elif binding.bind_type == imputil.Import.STAR:
633+
self.writer.write_checked_call1('πg.LoadMembers(πF, {}[0])', mod_slice.name)
632634
else:
633635
self.writer.write('{} = {}[{}]'.format(
634636
mod.name, mod_slice.expr, imp.name.count('.')))

0 commit comments

Comments
 (0)