code: func NewAlias(name string, symbol Symbol) Symbol {
  	switch s := symbol.(type) {
  	case *BrokenSymbol:
  		return newBrokenSymbol(name)
  	case *Term:
  		return newTerm(name, s.Def())
  	case *Invocation:
  		return newInvocation(name, s.Def(), s.fn, s.args)
  	case *Struct:
  		// Structs are copied by value too, but we check they are frozen at this
  		// point, so it should be fine. It is possible the struct is not frozen yet
  		// in the following self-referential case: 'a = {}; a = struct(k = a)'. But
  		// it is not allowed by starlark (redefinitions are forbidden). We still
  		// cautiously treat this case as broken.
  		if !s.frozen {
  			return newBrokenSymbol(name)
  		}
  		strct := newStruct(name, s.Def())
  		strct.symbols = s.symbols // it is immutable, copying the pointer is fine
  		strct.freeze()
  		return strct
  	default:
  		panic(fmt.Sprintf("unrecognized symbol type %T", s))
  	}
  }
docs: // NewAlias handles definitions like "a = <symbol>".
  //
  // It returns a new symbol of the same type as the RHS and new name ('a'). It
  // points to the same definition the symbol on the RHS points to.