Skip to content

Extra "object is not a closure" error reporting in VM #998

Closed
@DartBot

Description

@DartBot

This issue was originally filed by ief...@unipro.ru


What steps will reproduce the problem?
Run the following test (in scripting mode):
main() {
  try {
    [null].filter(true);
  } catch(ObjectNotClosureException ok) {}
}

What is the expected output? What do you see instead?
Expected: Test successfully finished, there is no output
Actual: Test successfully finished, and the following message is printed:
"object 'true' is not a closure"

What version of the product are you using? On what operating system?
DartVM r2810

Please provide any additional information below.
see runtime/vm/code_generator.cc, line 858:

 // const Array& arguments = Array::CheckedHandle(arguments.At(1));
  OS::PrintErr("object '%s' is not a closure\n", bad_closure.ToCString());
  GrowableArray<const Object*> args;
  Exceptions::ThrowByType(Exceptions::kObjectNotClosure, args);

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions