racket / racket/rhombus

Namespace nested within incomplete `class` gets confused with identically-named top-level namespace

Open
#760 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Racket
Stars
601
Forks
74
Avg merge
2d 10h
Merged PRs (30d)
5

Description

#lang rhombus

class Foo():
  export math
  namespace math:
    def my_pi = Foo.math.pi /* succeeds, but should not */

def my_other_pi = Foo.math.pi /* correctly fails */

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the provided Rhombus example and trace how the nested namespace resolves Foo.math.pi inside the incomplete class versus at top level. The work is done when both references follow the intended namespace rules, with the inner reference no longer succeeding unexpectedly.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.