Skip to content

Commit

Permalink
Change assumption of output on unresolved callee
Browse files Browse the repository at this point in the history
  • Loading branch information
swernli committed May 10, 2024
1 parent 2b974ec commit 2e5aba4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 25 deletions.
9 changes: 1 addition & 8 deletions compiler/qsc_passes/src/capabilitiesck/tests_adaptive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -432,14 +432,7 @@ fn call_to_unresolved_allowed() {
check_profile(
CALL_UNRESOLVED_FUNCTION,
&expect![[r#"
[
UseOfDynamicDouble(
Span {
lo: 172,
hi: 180,
},
),
]
[]
"#]],
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,14 +372,7 @@ fn call_to_unresolved_allowed() {
check_profile(
CALL_UNRESOLVED_FUNCTION,
&expect![[r#"
[
UseOfDynamicDouble(
Span {
lo: 172,
hi: 180,
},
),
]
[]
"#]],
);
}
Expand Down
9 changes: 1 addition & 8 deletions compiler/qsc_passes/src/capabilitiesck/tests_base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -520,14 +520,7 @@ fn call_to_unresolved_allowed() {
check_profile(
CALL_UNRESOLVED_FUNCTION,
&expect![[r#"
[
UseOfDynamicDouble(
Span {
lo: 172,
hi: 180,
},
),
]
[]
"#]],
);
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/qsc_rca/src/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ impl<'a> Analyzer<'a> {
let Some(callee) = maybe_callee else {
// The value kind of a call expression with an unresolved callee is dynamic but its specific variant depends
// on the expression's type.
let value_kind = ValueKind::new_dynamic_from_type(expr_type);
let value_kind = ValueKind::new_static_from_type(expr_type);
let compute_kind = ComputeKind::Quantum(QuantumProperties {
runtime_features: RuntimeFeatureFlags::CallToUnresolvedCallee,
value_kind,
Expand Down

0 comments on commit 2e5aba4

Please sign in to comment.