Skip to content

Uncaught TypeError: Class constructor Shape cannot be invoked without 'new' #2

@teamco

Description

@teamco

`class Colored {
initializer () { this._color = "white" }
get color () { return this._color }
set color (v) { this._color = v }
}

class ZCoord {
initializer () { this._z = 0 }
get z () { return this._z }
set z (v) { this._z = v }
}

class Shape {
constructor (x, y) { this._x = x; this._y = y }
get x () { return this._x }
set x (v) { this._x = v }
get y () { return this._y }
set y (v) { this._y = v }
}

class Rectangle extends aggregation(Shape, Colored, ZCoord) {}
new Rectangle(5,6)`

Uncaught TypeError: Class constructor Shape cannot be invoked without 'new' at new __Aggregate (aggregation-es6.js:31) __Aggregate @ aggregation-es6.js:31

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