Files
Odin/tests/issues/run.sh
finn ec32967daa [check-type] fix faulty #no_nil variants error
- when checking the variants of a union type we will skip adding
  the variants if we have an unspecialized polymorphic, hence our
  union_type variants will be empty and have a count of 0

- so when checking if we violate the #no_nil error, if we are in the
  unspecialized polymorphic case and there exists at least one variant
  in the original variants then we should not raise this error

- test checks that we do not raise the error anymore, and that we still
  detect the #no_nil error in the described circumstances
2023-06-13 22:07:01 +02:00

29 lines
629 B
Bash
Executable File

#!/bin/bash
set -eu
mkdir -p build
pushd build
ODIN=../../../odin
COMMON="-collection:tests=../.."
NO_NIL_ERR="Error: "
set -x
$ODIN test ../test_issue_829.odin $COMMON -file
$ODIN test ../test_issue_1592.odin $COMMON -file
$ODIN test ../test_issue_2056.odin $COMMON -file
$ODIN test ../test_issue_2087.odin $COMMON -file
$ODIN build ../test_issue_2113.odin $COMMON -file -debug
$ODIN test ../test_issue_2466.odin $COMMON -file
if [[ $($ODIN build ../test_issue_2395.odin $COMMON -file 2>&1 >/dev/null | grep -c "$NO_NIL_ERR") -eq 2 ]] ; then
echo "SUCCESSFUL 1/1"
else
echo "SUCCESSFUL 0/1"
fi
set +x
popd
rm -rf build