1195 Attempted access of inaccessible method _ through a reference with static type _.

You are either calling a private method from another class, or calling a method defined in a namespace that is not in use. If you are calling a method defined in an unused namespace, add a use statement for the required namespace.

Advertisements

4 thoughts on “1195 Attempted access of inaccessible method _ through a reference with static type _.

  1. There are some other cases that cause this confusing error.

    One is when a method is defined as a getter, but you call it as a function:

    public function get visible():Boolean {
    }

    later:
    v = rectangle.visible();

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s