Skip to content

Interop rough edges: Clr::Name.new(nil), new() constraint, generic inference from Method, conversion messages #141

Closed

Description

@Largo

Smaller interop rough edges found while auditing the Tests/Interop specs deleted in #119 (current master, net10.0):

  • Clr::Name.new(nil) leaks System::ArgumentNullException instead of a TypeError.
  • A Ruby class as T for a new() constraint (Activator.CreateInstance[T] with a Ruby class) gives NoMethodError "No parameterless constructor".
  • Generic inference fails from a Method object: System::Array.find_all(arr, 2.method(:<)) fails, while the same call with a block works.
  • Misleading conversion errors: System::Math.abs(nil) reports a conversion "into System::SByte" (the first overload tried), and System::String.IsNullOrEmpty(Object.new) says "is not a symbol nor a string".
  • "a".to_clr_string.foo! raises TypeError ("Mutating method") where a NoMethodError is expected.

Activity

  1. added a commit that references this issue on Nov 8, 2026
  2. Largo commented on Nov 8, 2026

    @Largo
    OwnerAuthor

    see #148

  3. added a commit that references this issue on Nov 8, 2026
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