blob: 5a6faf9deac4efcabc8212a113a2288693029793 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
--TEST--
Enum cannot have properties, even via traits
--FILE--
<?php
trait Rectangle {
protected string $shape = "Rectangle";
public function shape(): string {
return $this->shape;
}
}
enum Suit {
use Rectangle;
case Hearts;
case Diamonds;
case Clubs;
case Spades;
}
?>
--EXPECTF--
Fatal error: Enum "Suit" may not include properties in %s on line %d
|