Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

dart core functions treated as dynamic? #2

Closed
jmesserly opened this issue Nov 26, 2014 · 2 comments
Closed

dart core functions treated as dynamic? #2

jmesserly opened this issue Nov 26, 2014 · 2 comments

Comments

@jmesserly
Copy link
Contributor

This line doesn't seem like it can possibly be right :)
https://github.com/dart-lang/dart-dev-compiler/blob/master/lib/typechecker.dart#L328

    if (type.isDynamic || type.isDartCoreFunction) {
      record(new DynamicInvoke(_rules, node));
    }
@vsmenon
Copy link
Contributor

vsmenon commented Dec 1, 2014

type.isDartCoreFunction <=> the type is "Function" in dart:core. E.g.,

void foo(Function f) {
f(27, "hello");
}

@jmesserly
Copy link
Contributor Author

Aha! That makes more sense. I was confused by the API name, but yeah, the code makes sense if it's the special type Function. It really doesn't tell us more than dynamic.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants