Skip to content

op2 error message for static_method is wrong #1126

@petamoriken

Description

@petamoriken

While implementing the Geometry Interface in denoland/deno#27527, I found that the function names in the static_method error messages are not correct.

#[op2(base)]
impl DOMMatrixReadOnly {
  // ...

  #[rename("fromFloat32Array")]
  #[required(1)]
  #[static_method]
  #[cppgc]
  pub fn from_float32_array<'a>(
    scope: &mut v8::HandleScope<'a>,
    value: v8::Local<'a, v8::Value>,
  ) -> Result<DOMMatrixReadOnly, GeometryError> {
  // ...
  }
}
Deno 2.3.0-rc.3
exit using ctrl+d, ctrl+c, or close()
REPL is running with all permissions allowed.
To specify permissions, run `deno repl` with allow flags.
> DOMMatrix.fromFloat32Array()
Uncaught TypeError: Failed to execute 'DOMMatrix.call': 1 argument required, but only 0 present
    at <anonymous>:1:32

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