Skip to content

UnaryConstraint.inheritsFrom is not a function #4

@anonyein

Description

@anonyein
Object.prototype.inheritsFrom = function (shuper) {
  try {
    function Inheriter() { }
    Inheriter.prototype = shuper.prototype;
    this.prototype = new Inheriter();
    this.superConstructor = shuper;
  } catch (error) {
    console.error("Inheritance error: " + error + error.stack);
  }
}

function UnaryConstraint(v, strength) {
  try {
    UnaryConstraint.superConstructor.call(this, strength);
    this.myOutput = v;
    this.satisfied = false;
  } catch (error) {
    console.error("Inheritance error: " + error + error.stack);
  }
}

function Constraint(strength) {
  this.strength = strength;
}

UnaryConstraint.inheritsFrom(Constraint)

com.caoccao.qjs4j.exceptions.JSException: TypeError: UnaryConstraint.inheritsFrom is not a function

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions