}, new LinkedList<>(), this.getName());
}
@Override
protected Environment doExtend(Environment old, Environment against) {
Environment newEnv = old.extend(nameBinding).extend(typeBinding);
// FIXME: Currently allow this and class in both class and object methods. :(
//newEnv = newEnv.extend(new TypeBinding("class", typeBinding.getType()));
//newEnv = newEnv.extend(new NameBindingImpl("this", nameBinding.getType()));
//extend with tag information
if (isTagged()) {
//type-test the tag information
//TODO: fix this
//first get/ create the binding
TagBinding tagBinding = TagBinding.getOrCreate(taggedInfo.getTagName());
newEnv = newEnv.extend(tagBinding);
//now handle case-of and comprises clauses
if (taggedInfo.getCaseOfTag() != null) {
String caseOf = taggedInfo.getCaseOfTag();