def _legalize_arg_type(self, name, typ, loc):
        """Legalize the argument type

        Parameters
        ----------
        name: str
            argument name.
        typ: numba.core.types.Type
            argument type.
        loc: numba.core.ir.Loc
            source location for error reporting.
        """
        if getattr(typ, "reflected", False):
            msgbuf = [
                "Objmode context failed.",
                f"Argument {name!r} is declared as "
                f"an unsupported type: {typ}.",
                "Reflected types are not supported.",
            ]
            raise errors.CompilerError(" ".join(msgbuf), loc=loc)
Legalize the argument type

        Parameters
        ----------
        name: str
            argument name.
        typ: numba.core.types.Type
            argument type.
        loc: numba.core.ir.Loc
            source location for error reporting.
        
numba/core/withcontexts.py