-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve backward type propagation for arrays
- fixes #169
- Loading branch information
1 parent
02336b8
commit e5d9e61
Showing
3 changed files
with
46 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
tests/reg_issue169_backward_type_propagation_array/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# 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 | ||
# | ||
# Author: Fridtjof Siebert ([email protected]) | ||
# | ||
# ----------------------------------------------------------------------- | ||
|
||
override NAME = issue169 | ||
include ../positive.mk |
16 changes: 16 additions & 0 deletions
16
tests/reg_issue169_backward_type_propagation_array/issue169.fz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
issue169 => | ||
|
||
a array i32 := [] | ||
b Sequence i32 := [] | ||
c Sequence u8 := [] | ||
d Sequence f32 := [0,1,2] | ||
e Sequence (Sequence i16) := [[0,1],[2]] | ||
# NYI does not work yet | ||
# f := [u8 4, 3, 3] | ||
|
||
say (type_of a) | ||
say (type_of b) | ||
say (type_of c) | ||
say (type_of d) | ||
say (type_of e) | ||
# say (type_of f) |