This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 179411 - code assist does not always handle protected methods properly
Summary: code assist does not always handle protected methods properly
Status: RESOLVED WORKSFORME
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P4 normal (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-12 04:44 UTC by tln
Modified: 2016-09-22 02:44 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tln 2010-01-12 04:44:08 UTC
The following is a valid and working PHP script (PHP 5.3):

<?php

class A
{
	protected function do_a()
	{
		echo "a";
	}
}

class B extends A
{
	protected function do_a()
	{
		echo "b";
	}
}

class C extends A
{
	public function do_c()
	{
		$b=new B;
		$b->do_a();
	}
}

$c=new C;
$c->do_c();

?>


However, Netbeans obviously assumes I'm not allowed to execute the statement "$b->do_a()" due to the method's "protected" modifier. Hence code assist doesn't offer anything here.
Comment 1 rmatous 2010-03-17 15:48:26 UTC
You are right, anyway P4
Comment 2 Filip Zamboj 2010-09-15 12:30:42 UTC
batch reassigning
Comment 3 Tomas Mysik 2011-06-08 14:57:30 UTC
Batch reassigning.
Comment 4 Ondrej Brejla 2011-08-16 09:08:38 UTC
Still reproducible.
Comment 5 amobilia 2016-09-22 02:44:02 UTC
This doesn't occurs anymore on the 8.2 rc version (dev 201609210002).
Feel free to reopen the ticket if the problem isn't solved on your configuration.

Regards