@@ -325,3 +325,49 @@ fn check_rca_for_call_to_function_that_receives_tuple_with_a_non_tuple_dynamic_a
325325 dynamic_param_applications: <empty>"# ] ] ,
326326 ) ;
327327}
328+
329+ #[ test]
330+ fn check_rca_for_call_to_function_passed_single_tuple_variable_for_multiple_args ( ) {
331+ let mut compilation_context = CompilationContext :: default ( ) ;
332+ compilation_context. update (
333+ r#"
334+ use q = Qubit();
335+ let x = (if MResetX(q) == One { 1 } else { 0 }, 2, 3);
336+ operation foo(a : Int, b : Int, c : Int) : Int { a + b + c };
337+ foo(x)
338+ "# ,
339+ ) ;
340+ let package_store_compute_properties = compilation_context. get_compute_properties ( ) ;
341+ check_last_statement_compute_properties (
342+ package_store_compute_properties,
343+ & expect ! [ [ r#"
344+ ApplicationsGeneratorSet:
345+ inherent: Quantum: QuantumProperties:
346+ runtime_features: RuntimeFeatureFlags(UseOfDynamicBool | UseOfDynamicInt)
347+ value_kind: Element(Dynamic)
348+ dynamic_param_applications: <empty>"# ] ] ,
349+ ) ;
350+ }
351+
352+ #[ test]
353+ fn check_rca_for_call_to_lambda_passed_single_tuple_variable_for_multiple_args ( ) {
354+ let mut compilation_context = CompilationContext :: default ( ) ;
355+ compilation_context. update (
356+ r#"
357+ use q = Qubit();
358+ let x = (if MResetX(q) == One { 1 } else { 0 }, 2, 3);
359+ let lambda = (a, b, c) -> { a + b + c };
360+ lambda(x)
361+ "# ,
362+ ) ;
363+ let package_store_compute_properties = compilation_context. get_compute_properties ( ) ;
364+ check_last_statement_compute_properties (
365+ package_store_compute_properties,
366+ & expect ! [ [ r#"
367+ ApplicationsGeneratorSet:
368+ inherent: Quantum: QuantumProperties:
369+ runtime_features: RuntimeFeatureFlags(UseOfDynamicBool | UseOfDynamicInt)
370+ value_kind: Element(Dynamic)
371+ dynamic_param_applications: <empty>"# ] ] ,
372+ ) ;
373+ }
0 commit comments