Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix show for MethodList when methods are from another module #52354

Merged
merged 2 commits into from
Dec 22, 2023

Commits on Dec 21, 2023

  1. Fix show for MethodList when methods are from another module

    When a type is defined in one module but its methods are defined
    elsewhere, `show_method_table` errors due to an incorrect lookup of the
    defining module used to determine colors for printing. In particular,
    the code had been assuming that the type is defined in the module in
    which its constructor's first method (in the sense of
    `first(methods())`) is defined, which isn't always true.
    
    The color used for printing the module name needs to be determined on a
    per-method basis and can't be correctly done based on the method table's
    module. For each method, we attempt to derive the module for the method
    table to which the method was added, then determine whether it's the
    same as the defining module for the method.
    
    Fixes #49382
    Fixes #49403
    Fixes #52043
    
    Co-Authored-By: Jameson Nash <[email protected]>
    ararslan and vtjnash committed Dec 21, 2023
    Configuration menu
    Copy the full SHA
    ba08ba6 View commit details
    Browse the repository at this point in the history

Commits on Dec 22, 2023

  1. Configuration menu
    Copy the full SHA
    f809b4f View commit details
    Browse the repository at this point in the history