Skip to content

Conversation

@schn2017
Copy link

The web IDE will throw the following error "OS subroutine Memory.alloc must follow the interface Array alloc(int)" when the return type is an int instead of an Array.

The web-ide expects the return type to be of type "Array" as defined in web-ide/simulator/src/vm/builtins.ts. See lines 205 to 213 of that file. The snippet is also attached below.

"Memory.alloc": {
   func: (memory, os) => {
      const [size] = getArgs(memory, 1);
      return os.memory.alloc(size);
   },
    args: ["int"],
    returnType: "Array",
    type: "function",
},

The web IDE will throw the following error "OS subroutine Memory.alloc must follow the interface Array alloc(int)" when the return type is an int instead of an Array.
@schn2017
Copy link
Author

The zip folder that is downloaded through google projects should probably be updated too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant