Skip to content

frog is not giving static type error when attempting to call non-function #490

Closed
@DartBot

Description

@DartBot

This issue was originally filed by [email protected]


This is giving no static errors or warnings in frog:

main() {
  print("hello");
  int num = 5;
  num(); // should be a warning or error here, since num is not a function
  print("done");
}

(I hit this because there are properties in the DOM which return things like a CanvasElement, and it's not obvious it's a property, so I have extra parentheses, so it would be good if the static checker could catch that.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions