Skip to content

Provide better toString() for implicit closures #2680

Closed
@DartBot

Description

@DartBot

This issue was originally filed by ladicek@gmail.com


Calling toString() on a closure always returns "Closure". However, if the closure is implicit (i.e., if it actually is a closurized function), the toString() method can provide more details. This can be very helpful when dealing with accidental closurization.

I'm attaching a patch against the Dart VM. Please, let me know if you agree with this change, so that I can issue a pull request, or if you want to discuss it some more.


Attachment:
0001-better-toString-for-closurized-functions.patch (1.09 KB)

Activity

madsager

madsager commented on Apr 23, 2012

@madsager
Contributor

Added Area-VM, Triaged labels.

ghost

ghost commented on Apr 23, 2012

@ghost

Set owner to @crelier.

crelier

crelier commented on Apr 23, 2012

@crelier
Contributor

Printing the signature of the closure will also be useful.
I have a cl under review.

Thanks to Ladislav Thon for the suggestion!


Added Started label.

crelier

crelier commented on Apr 23, 2012

@crelier
Contributor

Fixed in r6861.


Added Fixed label.

added a commit that references this issue on Oct 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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

      Participants

      @madsager@crelier@DartBot

      Issue actions

        Provide better toString() for implicit closures · Issue #2680 · dart-lang/sdk