Skip to content

Implement operator call() in dartc #1355

Closed

Description

@DartBot

This issue was originally filed by zundel@google.com


New in 0.7 rev of the spec, the call operator allows your object to be invoked as if it were a function and the logic defined in the body of the operator is invoked.

// simple test with no types in signature
class A1 {
  operator call() => 42;
}

var a1 = new A1();
Expect.equals(42, a1());

Activity

  1. DartBot commented on Jan 26, 2012

    @DartBot
    Author

    This comment was originally written by zundel@google.com


    Set owner to zundel@google.com.

  2. DartBot commented on Apr 5, 2012

    @DartBot
    Author

    This comment was originally written by zundel@google.com


    Removed the owner.

  3. kasperl commented on Apr 17, 2012

    @kasperl

    Removed Area-Compiler label.
    Added Area-Analyzer label.

  4. sethladd commented on May 7, 2012

    @sethladd
    Contributor

    Marked this as blocking #2931.

  5. bwilkerson commented on Jun 4, 2012

    @bwilkerson
    Member

    Added this to the M1 milestone.
    Removed Priority-Medium label.
    Added Priority-Low label.

  6. anders-sandholm commented on Jun 12, 2012

    @anders-sandholm

    Marked this as being blocked by #2931.

  7. gbracha commented on Jun 12, 2012

    @gbracha
    Contributor

    Bear in mind that it is no longer an operator, just a magic method. See recent specs.

  8. scheglov commented on Jun 18, 2012

    @scheglov
    Contributor

    Set owner to @scheglov.
    Added Accepted label.

  9. scheglov commented on Jun 18, 2012

    @scheglov
    Contributor
  10. scheglov commented on Jun 18, 2012

    @scheglov
    Contributor
  11. added this to the M1 milestone on Jun 18, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P3A lower priority bug or feature requestlegacy-area-analyzerUse area-devexp instead.

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions