Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected nullptr #63

Open
rmrfslashhome opened this issue Nov 25, 2022 · 0 comments
Open

Unexpected nullptr #63

rmrfslashhome opened this issue Nov 25, 2022 · 0 comments

Comments

@rmrfslashhome
Copy link

rmrfslashhome commented Nov 25, 2022

# test.mpl
drop: [v:;];

foo: [
  object: value:;;
  value @object.!value
  [object.value drop] call
];

{} 0i32 {} [
  object: {
    value: 0nx 0i32 addressToReference;
  };

  @object 42 foo

  object.value new
] "main" exportFunction

command

mplc test.mpl

output

test.mpl(17,16): error, [new], accessing nullptr
test.mpl(18,10): [exportFunction], called from here
test.mpl(1,1): [], called from here

expected

Compilation succeeds

The problem is somehow caused by the line [object.value drop] call, because without it the code does compile.

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

No branches or pull requests

1 participant