All Downloads are FREE. Search and download functionalities are using the official Maven repository.

Lib.Krakatau.ssa.ssa_ops.throw.py Maven / Gradle / Ivy

There is a newer version: 1.1
Show newest version
from .base import BaseOp
from .. import excepttypes
from ..constraints import ObjectConstraint

class Throw(BaseOp):
    def __init__(self, parent, args):
        super(Throw, self).__init__(parent, args, makeException=True)
        self.env = parent.env

    def propagateConstraints(self, x):
        if x.null:
            t = x.types
            exact = list(t.exact) + [excepttypes.NullPtr]
            return None, ObjectConstraint.fromTops(t.env, t.supers, exact, nonnull=True), None
        return None, x, None




© 2015 - 2025 Weber Informatics LLC | Privacy Policy