def test_optional_to_optional(self):
        # Attempt to cast optional(intp) to optional(float64)
        opt_int = types.Optional(types.intp)
        opt_flt = types.Optional(types.float64)
        sig = opt_flt(opt_int)

        @njit(sig)
        def foo(a):
            return a

        self.assertEqual(foo(2), 2)
        self.assertIsNone(foo(None))
Test error due mishandling of Optional to Optional casting
dataset/ETHPy150Open numba/numba/numba/tests/test_casting.py/TestCasting.test_optional_to_optional