Skip to content

Commit

Permalink
Merge branch 'issue/3757'
Browse files Browse the repository at this point in the history
* issue/3757:
  Update tests/reg_issue3757/reg_issue3757.fz
  be/jvm: fix check condition in drop
  • Loading branch information
maxteufel committed Sep 12, 2024
2 parents 6c8ec4e + 64fd342 commit ab85494
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/dev/flang/be/jvm/Choices.java
Original file line number Diff line number Diff line change
Expand Up @@ -788,12 +788,11 @@ Expr tag(JVM jvm, int s, Expr value, int newcl, int tagNum)
fn,
ft));
}
res = res.is(_types.javaType(newcl));
break;
}
default: throw new Error("Unexpected choice kind in tag of JVM backend: " + kind(newcl));
}
return res;
return res.is(_types.javaType(newcl));
}


Expand Down
25 changes: 25 additions & 0 deletions tests/reg_issue3757/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# This file is part of the Fuzion language implementation.
#
# The Fuzion language implementation is free software: you can redistribute it
# and/or modify it under the terms of the GNU General Public License as published
# by the Free Software Foundation, version 3 of the License.
#
# The Fuzion language implementation is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
# License for more details.
#
# You should have received a copy of the GNU General Public License along with The
# Fuzion language implementation. If not, see <https://www.gnu.org/licenses/>.


# -----------------------------------------------------------------------
#
# Tokiwa Software GmbH, Germany
#
# Source code of Fuzion test Makefile
#
# -----------------------------------------------------------------------

override NAME = reg_issue3757
include ../simple.mk
26 changes: 26 additions & 0 deletions tests/reg_issue3757/reg_issue3757.fz
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# This file is part of the Fuzion language implementation.
#
# The Fuzion language implementation is free software: you can redistribute it
# and/or modify it under the terms of the GNU General Public License as published
# by the Free Software Foundation, version 3 of the License.
#
# The Fuzion language implementation is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
# License for more details.
#
# You should have received a copy of the GNU General Public License along with The
# Fuzion language implementation. If not, see <https://www.gnu.org/licenses/>.


# -----------------------------------------------------------------------
#
# Tokiwa Software GmbH, Germany
#
# Source code of Fuzion test reg_issue3757
#
# -----------------------------------------------------------------------

my_string : String is
my_choice2 : choice String my_string is
mc2 my_choice2 := "str"
Empty file.
Empty file.

0 comments on commit ab85494

Please sign in to comment.