Skip to content

Bug in S7 printer when implementing dim and constructor #560

@sebffischer

Description

@sebffischer
library(S7)
A = new_class("A",
  constructor = function() {
    new_object(A)
  }
)

a = A()
method(dim, A) <- function(x) {
  1L
}
a
#> <A>
#> Error in attributes(object) <- list(names = names(object), dim = dim(object)): invalid first argument, must be vector (list or atomic)

Created on 2025-08-19 with reprex v2.1.1

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