public TypeDeclaration(String name, DeclSequence decls, Reference<Value> metadata, FileLocation clsNameLine) {
// System.out.println("Initialising TypeDeclaration ( " + name + "): decls" + decls);
this.decls = decls;
nameBinding = new NameBindingImpl(name, null);
typeBinding = new TypeBinding(name, null, metadata);
Type objectType = new TypeType(this);
attrEnv.set(attrEnv.get().extend(new TypeDeclBinding("type", this)));
Type classType = new ClassType(attrEnv, attrEnv, new LinkedList<String>(), getName()); // TODO set this to a class type that has the class members
nameBinding = new LateNameBinding(nameBinding.getName(), () -> metadata.get().getType());
typeBinding = new TypeBinding(nameBinding.getName(), objectType, metadata);
// System.out.println("TypeDeclaration: " + nameBinding.getName() + " is now bound to type: " + objectType);