It is compile-time error to invoke not existing function #12381
Labels
area-test
Cross-cutting test issues (use area- labels for specific failures; not used for package:test).
closed-obsolete
Closed as the reported issue is no longer relevant
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
language/issue11724_test
language/call_nonexistent_static_test/08
main() {
f()
}
f() is unqualified invocation 12.14.3.
"An unqualified function invocation i has the form
id(a1; : : : ; an; xn+1 : an+1; : : : ; xn+k : an+k),
where id is an identier."
And because "f" is not defined, we use "Otherwise, i is equivalent to this:id(a1; : : : ; an; xn+1 : an+1; : : : ; xn+k : an+k)."
But in 12.10 it is specified that "It is a compile-time error if this appears in a top-level function or variable
initializer, in a factory constructor, or in a static method or variable initializer,
or in the initializer of an instance variable."
The text was updated successfully, but these errors were encountered: