Skip to content
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

explorer crashes when using a function with invalid definition for specifying return type of another function #1395

Closed
pk19604014 opened this issue Jul 15, 2022 · 0 comments · Fixed by #2266 or #2288
Labels
explorer Action items related to Carbon explorer code

Comments

@pk19604014
Copy link
Contributor

package P api;

fn f() {
  var auto = true.g();
}

fn h() -> f() {
}

fn Main() -> i32 {
  return 0;
}

CHECK failure at ./explorer/ast/expression.h:54: static_type_.has_value()
@jonmeow jonmeow added the explorer Action items related to Carbon explorer code label Aug 24, 2022
zygoloid added a commit to zygoloid/carbon-lang that referenced this issue Oct 13, 2022
There are lots of ways a declaration can be used before we have the
information necessary to handle that use. Issue diagnostics for these.

Interleave declaration and type-checking of global declarations so that
declaring a later declaration can depend on the results of type-checking
an earlier one.

Fixes carbon-language#1394, fixes carbon-language#1395, fixes carbon-language#1396.
zygoloid added a commit that referenced this issue Oct 13, 2022
There are lots of ways a declaration can be used before we have the information necessary to handle that use. Issue diagnostics for these.

Interleave declaration and type-checking of global declarations so that declaring a later declaration can depend on the results of type-checking an earlier one.

Incorporates tests added in #2266.

Fixes #1394, fixes #1395, fixes #1396.

Co-authored-by: pmqtt <51272730+pmqtt@users.noreply.github.com>
Co-authored-by: Jon Ross-Perkins <jperkins@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
explorer Action items related to Carbon explorer code
Projects
None yet
2 participants