Skip to content

Untested copy constructor wrong behavior #218

@kenny-y

Description

@kenny-y

this._wrapperFields.data = new Int16Wrapper(other._wrapperFields.data) is wrong, it should be an array.

Generated Code undef /generated/ dir:

// Define the wrapper class.
class Int16MultiArrayWrapper {
  constructor(other) {
    this._wrapperFields = {};
    if (typeof other === 'object' && other._refObject) {
      this._refObject = new Int16MultiArrayRefStruct(other._refObject.toObject());
      this._wrapperFields.layout =  new MultiArrayLayoutWrapper(other._wrapperFields.layout);
      this._wrapperFields.data =  new Int16Wrapper(other._wrapperFields.data);
    } else {
      this._refObject = new Int16MultiArrayRefStruct();
      this._wrapperFields.layout = new MultiArrayLayoutWrapper();
      this._wrapperFields.data = Int16Wrapper.createArray();
    }
    this.freeze();
  }

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions