Skip to content

Nested Function Naming Collision #31

Description

@FrancoGiachetta

Problem: When compiling nested functions as module-level private functions, the codegen iterates over both:

  1. Global functions from program.functions
  2. Nested functions from each function's sym_table.functions

This causes potential naming collisions if a nested function has the same name as a global function or another nested function.

Root cause: MLIR's func.func has the IsolatedFromAbove trait, which prevents true nested function nesting (functions can't capture parent scope). Current workaround makes nested functions module-level private, losing the namespacing.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions