Skip to content

Unexpected module resolution #712

Description

@emgordon154

What happened?

(import std.Prelude)
(import std.List:*)
(print (max [1 2]))
(import std.Prelude)
(import std.List :max)
(print (max [1 2]))

In both these examples, I would expect max to be list:max, but instead it's math:max. I find that confusing, because math:max is not defined nor imported without the prefix in either module.

Both examples work as I'd expect (max resolving to math:max--EDIT: list:max, sorry!) if the order of imports is reversed.

What ArkScript version are you seeing the problem on?

4.7.2

Operating System

Linux

Compiler used

None

Compiler version used

No response

Relevant code & log output

ArityError: When calling `(math:max [1 2])', received 1 argument, but expected 2: `(math:max _a _b)'
 
 
At IP: 597, PP: 0, SP: 3
exit status 1

Documentation

  • I have read existing related documentation before submitting this report
  • I have searched for an existing issue before posting

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions