the-liquid-metal opened a new issue, #6038:
URL: https://github.com/apache/netbeans/issues/6038
### Apache NetBeans version
Apache NetBeans 18
### What happened
Accessing/invoking all trait member using its name inside its body must
produce error.
### How to reproduce
```php
<?php
declare(strict_types=1);
trait MyTrait {
public static string $publicProp = "foo";
public static function publicFunc(): string {
return "bar";
}
public static function fnStatic() {
echo MyTrait::$publicProp; // this statement must display error
echo static::$publicProp; // OK
echo self::$publicProp; // OK
echo MyTrait::publicFunc(); // this statement must display error
echo static::publicFunc(); // OK
echo self::publicFunc(); // OK
}
public function fnInstance() {
echo MyTrait::$publicProp; // this statement must display error
echo static::$publicProp; // OK
echo self::$publicProp; // OK
echo $this::$publicProp; // OK
echo MyTrait::publicFunc(); // this statement must display error
echo static::publicFunc(); // OK
echo self::publicFunc(); // OK
echo $this::publicFunc(); // OK
}
}
class MyClass {
use MyTrait;
}
$ins = new MyClass;
$ins::fnStatic();
$ins->fnInstance();
```
### 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 binary zip
### Anything else
_No response_
### Are you willing to submit a pull request?
No
--
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