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

Draft: Prevent disallowed conversions between object and by-ref-like parameter and return types #665

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Commits on Sep 3, 2023

  1. Configuration menu
    Copy the full SHA
    904397f View commit details
    Browse the repository at this point in the history
  2. Add failing tests for by-ref-like types

     * Most tests fail with a `InvalidProgramException`: "Cannot create
       boxed ByRef-like values.".
    
     * One test fails with a `InvalidOperationException`: "Interceptors
       failed to set a return value [...]."
    stakx committed Sep 3, 2023
    Configuration menu
    Copy the full SHA
    375fe40 View commit details
    Browse the repository at this point in the history
  3. Avoid object <-> by-ref-like type conversions

     * Wherever we are currently converting a by-ref-like argument or return
       value to `object`, we substitute `null` (because boxing is disallowed
       for by-ref-like types).
    
     * Wherever we convert from `object`, we substitute the default value
       for the by-ref-like type (because unboxing likewise doesn't work).
    stakx committed Sep 3, 2023
    Configuration menu
    Copy the full SHA
    d99a22f View commit details
    Browse the repository at this point in the history
  4. Type.IsByRefLike is not always implemented

    ... which might be a bug in the runtime. We need a workaround for that.
    stakx committed Sep 3, 2023
    Configuration menu
    Copy the full SHA
    f61fad5 View commit details
    Browse the repository at this point in the history
  5. Update changelog

    stakx committed Sep 3, 2023
    Configuration menu
    Copy the full SHA
    9f72f39 View commit details
    Browse the repository at this point in the history