Getting error CS0201 in Unity3D while accessing property from other script

Consider the scenario, where one script has a class with an attribute defined and then I am trying to access this class from an another class, which is in a different script file. While accessing the attribute there in the second script file, I am getting error as:


Assets\Scripts\CallingScript.cs(32,9): error CS0201: Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement


Also, sharing both the scripts 


Base Script

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Chest : MonoBehaviour
{
    public Sprite openChest;

    public GameObject chest1;
    public GameObject chestBox;
    public GameObject torch;

    public bool hasTorch = false;

    public GameObject darkness;
    public GameObject chatBox;

    private void OnTriggerEnter2D(Collider2D other)
    {
        chest1.GetComponent<SpriteRenderer>().sprite = openChest;
        torch.SetActive(true);
        chatBox.SetActive(true);
        darkness.SetActive(false);
        chestBox.SetActive(false);

        hasTorch = true;
    }

    public void Close()
    {
        chatBox.SetActive(false);
    }
}


CallingScript


using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Wood : MonoBehaviour
{

    public GameObject chestScript;
    public Chest script;

    public GameObject chatBox;

    private void OnTriggerEnter2D(Collider2D other)
    {
        if (script.hasTorch == true)
        {
            chatBox.SetActive(true);
        }

        if (script.hasTorch == true)
        {
            chatBox.SetActive(true);
        }
    }

    public void Close()
    {
        chatBox.SetActive(false);
    }

    void Start(){
        chestScript.GetComponentInChildren<Chest>().hasTorch;
    }

}


I am getting error on line 


chestScript.GetComponentInChildren<Chest>().hasTorch