this fails under diamond inheritance
430621
def cascade_delete(self, name):
    ""
    for child in self[name].child_tables:
      self.cascade_delete(child.name)
    del self[name]
1068052
function(name, val, desc){
        if (this.negate && undefined !== val) {
            if (undefined === this.obj[name]) {
                throw new Error(this.inspect + ' has no property ' + i(name) + (desc ? " | " + desc : ""));
            }
        } else {
            this.assert(
                undefined !== this.obj[name]
                , function(){ return 'expected ' + this.inspect + ' to have a property ' + i(name) + (desc ? " | " + desc : "") }
                , function(){ return 'expected ' + this.inspect + ' to not have a property ' + i(name) + (desc ? " | " + desc : "") });
        }

        if (undefined !== val) {
            this.assert(
                val === this.obj[name]
                , function(){ return 'expected ' + this.inspect + ' to have a property ' + i(name)
                    + ' of ' + i(val) + ', but got ' + i(this.obj[name]) + (desc ? " | " + desc : "") }
                , function(){ return 'expected ' + this.inspect + ' to not have a property ' + i(name) + ' of ' + i(val) + (desc ? " | " + desc : "") });
        }

        this.obj = this.obj[name];
        return this;
    }
498273
function inheritParams(currentParams, newParams, $current, $to) {
  var parents = ancestors($current, $to), parentParams, inherited = {}, inheritList = [];

  for (var i in parents) {
    if (!parents[i].params) continue;
    // This test allows compatibility with 0.2.x and 0.3.x (optional and object params)
    parentParams = isArray(parents[i].params) ? parents[i].params : objectKeys(parents[i].params);
    if (!parentParams.length) continue;

    for (var j in parentParams) {
      if (arraySearch(inheritList, parentParams[j]) >= 0) continue;
      inheritList.push(parentParams[j]);
      inherited[parentParams[j]] = currentParams[parentParams[j]];
    }
  }
  return extend({}, inherited, newParams);
}
388051
function (parentType, childType) {
        if (!jv._options.checkInheritance) {
            return true;
        }
        var typeRef = childType;
        while (!typeRef[jv._MD_BUILTIN]) {
            if (parentType == typeRef) {
                return true;
            }
            typeRef = typeRef[jv._MD_PARENTDEF];
        }
        jv._logError(jv.INHERITANCE_EXPECTED, [childType[jv._MD_TYPENAME], parentType[jv._MD_TYPENAME]]);
        return false;
    }
343132
function inherit(child, base, properties) {
    var baseP = base.prototype,
        childP;

    childP = child.prototype = Object.create(baseP);
    childP.constructor = child;
    childP._super = baseP;

    if (properties) {
        assign(childP, properties);
    }
}
1366801
function apply_autodetected(m, ast, inheritable) {
  docset = find_docset(ast);
  var inheritable = inheritable || true;
  
  if (!docset || docset["type"] != "doc_comment") {
    if (inheritable)
      m["inheritdoc"] = {};
    else
      m["private"] = true;
      
    m["autodetected"] = true;
  }

  if (docset) {
    docset["code"] = m;
    return false;
  }
  else {
    // Get line number from third place at range array.
    // This third item exists in forked EsprimaJS at
    // https://github.com/nene/esprima/tree/linenr-in-range
    m["linenr"] = ast["range"][2];
    return true;
  }
}
1224835
def disinherit(name, objectType, copy_inherited_acl=True):
    '''
    
    '''
    ret = {'name': name,
           'result': True,
           'changes': {},
           'comment': ''}
    tRet = __salt__['win_dacl.check_inheritance'](name, objectType)
    if tRet['result']:
        if tRet['Inheritance']:
            if __opts__['test']:
                ret['result'] = None
                ret['changes']['Inheritance'] = "Disabled"
                ret['comment'] = 'Inheritance is set to be disabled.'
                ret['changes']['Inherited ACLs'] = (
                        'Are set to be kept' if copy_inherited_acl else 'Are set to be removed')
                return ret
            eRet = __salt__['win_dacl.disable_inheritance'](name, objectType, copy_inherited_acl)
            ret['result'] = eRet['result']
            if eRet['result']:
                ret['changes'] = dict(ret['changes'], **eRet['changes'])
            else:
                ret['comment'] = ' '.join([ret['comment'], eRet['comment']])
        else:
            if __opts__['test']:
                ret['result'] = None
                ret['comment'] = 'Inheritance is disabled.'
    else:
        ret['result'] = False
        ret['comment'] = tRet['comment']
    return ret
800294
function () {
  return {
    inheritPrototype: inheritPrototype,
    getInvalidProperties: getInvalidProperties,
    trim: trim,
    ltrim: ltrim,
    rtrim: rtrim,
    left: left,
    center: center,
    right: right,
    lpad: lpad,
    rpad: rpad,
    cpad: cpad,
    contains: contains,
    injectMethods: function (that) {
      that.inheritPrototype = inheritPrototype;
      that.getInvalidProperties = getInvalidProperties;
      that.trim = trim;
      that.ltrim = ltrim;
      that.rtrim = rtrim;
      that.left = left;
      that.center = center;
      that.right = right;
      that.lpad = lpad;
      that.rpad = rpad;
      that.cpad = cpad;
      that.contains = contains;
    }
  };
}
800079
function(depth) {
        if (depth >= this.depth || depth < 0)  {
            this.logger.log("illegal getAncestor depth: " + depth);
            return null;
        }

        var p = this.parent;
        
        while (p.depth > depth) {
            p = p.parent;
        }

        return p;
    }
659025
function inherit(options, destination, source, key) {
		var define, override, path;

		if (key in destination) {
			if (isObject(destination[key]) && isObject(source[key])) {
				//  live up to the name and merge the sub objects
				Object.keys(source[key]).forEach(function(k) {
					inherit(options, destination[key], source[key], k);
				});
			}

			return;
		}

		options.path.push(key);
		define = {enumerable: true};

		if (isObject(source[key])) {
			override = combine(options, [source[key]]);
		}
		else if (source[key] instanceof Array) {
			override = monitorArray(source[key], function() {
				options.emitter.emit('change', path, source[key], source[key]);
			});
		}

		if (isTrue(options, 'live')) {
			path = options.path.join('.');

			define.get = function() {
				return override || source[key];
			};

			define.set = function(value) {
				if (isTrue(options, 'locked') || value === destination[key]) {
					return;
				}

				if (isObject(value)) {
					options.path = path.split('.');
					value = combine(options, [value, source[key]]);
				}

				override = null;
				options.emitter.emit('change', path, value, source[key]);
				source[key] = value;
			};
		}
		else {
			define.value = override || source[key];
			define.writable = !isTrue(options, 'locked');
		}

		Object.defineProperty(destination, key, define);

		options.path.pop();
	}
1188705
function diamond(parent, bbox, node) {
  var w = (bbox.width * Math.SQRT2) / 2;
  var h = (bbox.height * Math.SQRT2) / 2;
  var points = [
    { x:  0, y: -h },
    { x: -w, y:  0 },
    { x:  0, y:  h },
    { x:  w, y:  0 }
  ];
  var shapeSvg = parent.insert("polygon", ":first-child")
    .attr("points", points.map(function(p) { return p.x + "," + p.y; }).join(" "));

  node.intersect = function(p) {
    return intersectPolygon(node, points, p);
  };

  return shapeSvg;
}
800411
List<JCExpression> typeArguments(boolean diamondAllowed) {
        if (token.kind == LT) {
            nextToken();
            if (token.kind == GT && diamondAllowed) {
                checkDiamond();
                mode |= DIAMOND;
                nextToken();
                return List.nil();
            } else {
                ListBuffer<JCExpression> args = new ListBuffer<>();
                args.append(((mode & EXPR) == 0) ? typeArgument() : parseType());
                while (token.kind == COMMA) {
                    nextToken();
                    args.append(((mode & EXPR) == 0) ? typeArgument() : parseType());
                }
                switch (token.kind) {

                case GTGTGTEQ: case GTGTEQ: case GTEQ:
                case GTGTGT: case GTGT:
                    token = S.split();
                    break;
                case GT:
                    nextToken();
                    break;
                default:
                    args.append(syntaxError(token.pos, "expected", GT));
                    break;
                }
                return args.toList();
            }
        } else {
            return List.<JCExpression>of(syntaxError(token.pos, "expected", LT));
        }
    }
1006301
def _clean_inheritance_tokens(self):
        """"""

        c = self._copy()
        x = c._data
        x.pop('self', None)
        x.pop('parent', None)
        x.pop('next', None)
        return c
240090
def _build_inheritance_chain(cls, bases, *names, merge=False):
        """"""
        result = []
        for name in names:
            maps = []
            for base in bases:
                bmap = getattr(base, name, None)
                if bmap is not None:
                    assert isinstance(bmap, (dict, ChainMap))
                    if len(bmap):
                        if isinstance(bmap, ChainMap):
                            maps.extend(bmap.maps)
                        else:
                            maps.append(bmap)
            result.append(ChainMap({}, *maps))
        if merge:
            result = [dict(map) for map in result]
        if len(names) == 1:
            return result[0]
        return result
840050
public static boolean isAnonymousDiamond(JCTree tree) {
        switch(tree.getTag()) {
            case NEWCLASS:  {
                JCNewClass nc = (JCNewClass)tree;
                return nc.def != null && isDiamond(nc.clazz);
            }
            case ANNOTATED_TYPE: return isAnonymousDiamond(((JCAnnotatedType)tree).underlyingType);
            default: return false;
        }
    }
148483
function SlotNode(aNode, parent, scope, owner, reverseWalker) {
    this.owner = owner;
    this.scope = scope;
    this.parent = parent;
    this.parentComponent = parent.nodeType === NodeType.CMPT
        ? parent
        : parent.parentComponent;

    this.id = guid++;

    this.lifeCycle = LifeCycle.start;
    this.children = [];

    // calc slot name
    this.nameBind = getANodeProp(aNode, 'name');
    if (this.nameBind) {
        this.isNamed = true;
        this.name = evalExpr(this.nameBind.expr, this.scope, this.owner);
    }

    // calc aNode children
    var sourceSlots = owner.sourceSlots;
    var matchedSlots;
    if (sourceSlots) {
        matchedSlots = this.isNamed ? sourceSlots.named[this.name] : sourceSlots.noname;
    }

    if (matchedSlots) {
        this.isInserted = true;
    }

    this.aNode = {
        directives: aNode.directives,
        props: [],
        events: [],
        children: matchedSlots || aNode.children.slice(0),
        vars: aNode.vars
    };

    // calc scoped slot vars
    var initData;
    if (nodeSBindInit(this, aNode.directives.bind)) {
        initData = extend({}, this._sbindData);
    }

    if (aNode.vars) {
        initData = initData || {};
        each(aNode.vars, function (varItem) {
            initData[varItem.name] = evalExpr(varItem.expr, scope, owner);
        });
    }

    // child owner & child scope
    if (this.isInserted) {
        this.childOwner = owner.owner;
        this.childScope = owner.scope;
    }

    if (initData) {
        this.isScoped = true;
        this.childScope = new Data(initData, this.childScope || this.scope);
    }


    owner.slotChildren.push(this);

    // #[begin] reverse
    if (reverseWalker) {

        this.sel = document.createComment(this.id);
        insertBefore(this.sel, reverseWalker.target, reverseWalker.current);

        var me = this;
        each(this.aNode.children, function (aNodeChild) {
            me.children.push(createReverseNode(
                aNodeChild,
                me,
                me.childScope || me.scope,
                me.childOwner || me.owner,
                reverseWalker
            ));
        });

        this.el = document.createComment(this.id);
        insertBefore(this.el, reverseWalker.target, reverseWalker.current);

        this.lifeCycle = LifeCycle.attached;
    }
    // #[end]
}
672215
function () {

        var A = $prototype ()
        var B = $extends (A)
        var C = $extends (B)

        $assert ($prototype.inheritanceChain (C), [C,B,A]) }