Skip to content

Commit

Permalink
Promoted bug file to ci, added explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
EkanshdeepGupta committed Oct 29, 2024
1 parent b0f5e2d commit 69c0f5d
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 24 deletions.
24 changes: 0 additions & 24 deletions test/bugs/inst_mod_frac_field.rav

This file was deleted.

34 changes: 34 additions & 0 deletions test/ci/front-end/inst_mod_frac_field.rav
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
interface A[Tp: Library.Type] {
field f: Tp.T
}

interface M {
module RefType : Library.Type {
rep type T = Ref
}

interface AN = A[RefType]

proc p(x: Ref) {
inhale own(x, AN.f, x, 1.0);
}

/*
There is a bug in the `rewrite_own_expr_4_arg` rewriter which
translates 4-arg own chunks into uniform 3-arg own chunks.

The name for the Frac module generated to rewrite the inhale expression is:
$Program.M.AN.Frac$Fld-Ref-.T

The name that is actually generated during the `rewrite_frac_field_types` rewrite is:
$Program.A.Frac$Fld-$Program_A_Tp_T-.T
*/


/*
This bug was fixed in the following commit:
b0f5e2d7a172fe321c677dcbad14eb340563097b

Earlier, `rewrite_frac_field_types` was using field types to generate frac module name. Switched to using field_name.
*/
}
2 changes: 2 additions & 0 deletions test/ci/front-end/inst_mod_frac_field.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
$ dune exec -- raven --shh ./inst_mod_frac_field.rav
Verification successful.

0 comments on commit 69c0f5d

Please sign in to comment.