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

interp: fix type assertion for wrapped empty interface #1467

Merged
merged 3 commits into from
Oct 3, 2022

Commits on Oct 3, 2022

  1. interp: fix type assertion for wrapped empty interface

    Although empty interfaces are usually not wrapped, for compatibility
    with the runtime, we may have to wrap them sometime into `valueInterface`
    type.
    
    It allows to preserve interpreter type metadata for interface values
    exchanged with the runtime. It is necessary to resolve methods and
    receivers in the absence of reflect support.
    
    During type assertions on empty interfaces, we now handle a possible
    valueInterface and dereference the original value to pursue the type
    assertion.
    
    In the same change, we have improved the format of some panic messages
    at runtime to give location of offending source at interpreter level.
    
    This change will allow to fix traefik/#9362.
    mvertes committed Oct 3, 2022
    Configuration menu
    Copy the full SHA
    98877d7 View commit details
    Browse the repository at this point in the history
  2. Update _test/cli7.go

    Co-authored-by: mpl <mathieu.lonjaret@gmail.com>
    mvertes and mpl authored Oct 3, 2022
    Configuration menu
    Copy the full SHA
    de38a3f View commit details
    Browse the repository at this point in the history
  3. Update _test/cli7.go

    Co-authored-by: mpl <mathieu.lonjaret@gmail.com>
    mvertes and mpl authored Oct 3, 2022
    Configuration menu
    Copy the full SHA
    a09a870 View commit details
    Browse the repository at this point in the history