To Reproduce
Steps to reproduce the behavior: copy-paste this script to the IDE
<?php
declare(strict_types=1);
namespace ns1\ns2;
enum Test37: string {
case Hearts = 'H';
case Diamonds = 'D';
case Clubs = 'C';
case Spades = 'S';
public function fn1() {} // OK
public function case() {} // this statement must trigger error
public function __construct($param) {} // this statement must trigger error
public function __destruct() {} // this statement must trigger error
public function __set($arg1, $arg2) {} // this statement must trigger error
public function __get($arg1) {} // this statement must trigger error
public function __isset($arg1) {} // this statement must trigger error
public function __unset($arg1) {} // this statement must trigger error
public function __sleep() {} // this statement must trigger error
public function __wakeup() {} // this statement must trigger error
public function __serialize() {} // this statement must trigger error
public function __unserialize($arg1) {} // this statement must trigger error
public function __toString() {} // this statement must trigger error
public function __clone() {} // this statement must trigger error
public function __debugInfo() {} // this statement must trigger error
public function __call(string $name, array $args) : mixed {} // OK
public static function fn2() {} // OK
public static function __set_state($arg1) {} // this statement must trigger error
public static function __callStatic(string $name, array $arguments): mixed {} // OK
}
Bug Description Missing error on defining forbidden enum methods.
Eclipse environment Version: 2023-06 (4.28.0) Build id: 20230608-1333 PDT: 8.0.0.202306050832
System
To Reproduce Steps to reproduce the behavior: copy-paste this script to the IDE