You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "pine3ree (via GitHub)" <gi...@apache.org> on 2025/05/23 17:05:07 UTC
[I] Anonymous class using a trait with asbtract method inside another class [netbeans]
pine3ree opened a new issue, #8527:
URL: https://github.com/apache/netbeans/issues/8527
### Apache NetBeans version
Apache NetBeans 26 latest release candidate
### What happened
Using anonymous class inside a class that uses a trait with an asbtract method causes a missing implementation issue on the wrapping class

### Language / Project Type / NetBeans Component
PHP
### How to reproduce
The issue can be reproduced just using the following code.
For simplicity I added both a test trait and a consumer test class in the same file
```php
<?php
trait MyTrait
{
abstract function doSomething();
public function doNothing()
{
}
}
class MyClass
{
public function getMyTraitAwareObject()
{
return new class() {
use MyTrait;
// doSomething is declared abstract in MyTrait.php
public function doSomething()
{
}
};
}
}
```
### Did this work correctly in an earlier version?
No / Don't know
### Operating System
Linux mint/ubuntu 22.04
### JDK
java-17-openjdk-amd64
### Apache NetBeans packaging
Apache NetBeans binary zip
### Anything else
Affects version 25 and 26, not checked previous versions
### 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: notifications-unsubscribe@netbeans.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists