Skip to content

TypeError: clazz is not a constructor on ≥ v11.6.0 #25451

Description

@nakhodkin

I'm experiencing an issue with a following piece of code

screen shot 2019-01-11 at 10 27 41 pm

'use strict';constpeople=[['John',19,'m'],['Valentine',28,'f'],['Christina',25,'f']];classPerson{getname(){returnthis[0];}getage(){returnthis[1];}getsex(){returnthis[2];}}people.forEach(person=>Object.setPrototypeOf(person,Person.prototype));constquery=person=>person.age>25;people.filter(query);

You can see a more detailed information about the stacktrace right below
screen shot 2019-01-11 at 10 49 55 pm

  • Node: v11.6.0:
  • Platform: macOS Mojave Version 10.14.2:

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues with confirmed bugs.utilIssues and PRs related to the built-in util module.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions