Skip to content

Improve error message for math namespace collision #4579

@pcaversaccio

Description

@pcaversaccio

The following snippet will throw with

from snekmate.utils import math
import math
vyper.exceptions.NamespaceCollision: 'math' has already been declared as a ModuleInfo(module_t=venv/Lib/site-packages/snekmate/utils/math.vy, alias='math', ownership=<ModuleOwnership.NO_OWNERSHIP: 'no_ownership'>, ownership_decl=None)

  contract "test.vy:2", line 2:0
       1 from snekmate.utils import math
  ---> 2 import math
  -------^
       3

You must run it via vyper test.vy --enable-decimals.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Easy PickingsUsed to denote issues that should be easy to implementbug - UXa bug related to UXhelp wanted

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions