the-liquid-metal opened a new issue, #5100:
URL: https://github.com/apache/netbeans/issues/5100
### Apache NetBeans version
Apache NetBeans 16
### What happened
Enum is missing autocompletion for instance context.
### How to reproduce
```php
<?php
interface IFace {
public function funcIFace(): string;
}
trait Trait1 {
public function funcTRaitPublic(): string {
return "hello";
}
private function funcTRaitPrivate(string $arg) {
echo $arg;
}
}
enum Suit: string implements IFace {
use Trait1;
case Hearts = 'H';
case Diamonds = 'D';
case Clubs = 'C';
case Spades = 'S';
const Cardx = self::Hearts;
const CardY = self::Diamonds;
public function funcIFace(): string {
return "hello";
}
public function funcInstancePublic(): string {
static::funcStaticPrivate(); // autocompletion for static context is
OK
$this->funcInstancePrivate(); // MISSING autocompletion for instance
context
return "hello";
}
private function funcInstancePrivate(): string {
static::funcStaticPublic(); // autocompletion for static context is
OK
$this->funcInstancePublic(); // MISSING autocompletion for instance
context
return "hello";
}
public static function funcStaticPublic(): string {
static::funcStaticPrivate(); // autocompletion for static context is
OK
$this->funcInstancePrivate(); // autocompletion for instance context
is not needed, this statement must display error
return "hello";
}
private static function funcStaticPrivate(): string {
static::funcStaticPublic(); // autocompletion for static context is OK
$this->funcInstancePublic(); // autocompletion for instance context is
not needed, this statement must display error
return "hello";
}
}
$card = Suit::Spades2; // autocompletion for static context is OK
$card::fun1Static(); // autocompletion for static context is OK
$card->funcInstancePublic(); // MISSING autocompletion for instance context,
but just public member is needed
```
### Did this work correctly in an earlier version?
No / Don't know
### Operating System
Windows 10
### JDK
Java: 14.0.1; Java HotSpot(TM) 64-Bit Server VM 14.0.1+7 Runtime: Java(TM)
SE Runtime Environment 14.0.1+7
### Apache NetBeans packaging
Apache NetBeans provided installer
### Anything else
_No response_
### Are you willing to submit a pull request?
No
### Code of Conduct
Yes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists