Skip to content

It is compile-time error to invoke not existing function #12381

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
scheglov opened this issue Aug 12, 2013 · 1 comment
Closed

It is compile-time error to invoke not existing function #12381

scheglov opened this issue Aug 12, 2013 · 1 comment
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)

Comments

@scheglov
Copy link
Contributor

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 identi er."

  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."

@scheglov scheglov added Type-Defect area-test Cross-cutting test issues (use area- labels for specific failures; not used for package:test). labels Aug 12, 2013
@kevmoo kevmoo added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) and removed priority-unassigned labels Feb 29, 2016
@natebosch
Copy link
Member

Can this be closed? Do the tests need to be updated or removed?

@scheglov scheglov added the closed-obsolete Closed as the reported issue is no longer relevant label Sep 6, 2018
@scheglov scheglov closed this as completed Sep 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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)
Projects
None yet
Development

No branches or pull requests

3 participants