@@ -24,6 +24,15 @@ class TypeUnion
24
24
/* testTypeUnionPropertyMulti3 */
25
25
| null $ arrayOrFalse ;
26
26
27
+ /* testTypeUnionPropertyNamespaceRelative */
28
+ public namespace \Sub \NameA |namespace \Sub \NameB $ namespaceRelative ;
29
+
30
+ /* testTypeUnionPropertyPartiallyQualified */
31
+ public Partially \Qualified \NameA |Partially \Qualified \NameB $ partiallyQual ;
32
+
33
+ /* testTypeUnionPropertyFullyQualified */
34
+ public \Fully \Qualified \NameA |\Fully \Qualified \NameB $ fullyQual ;
35
+
27
36
public function paramTypes (
28
37
/* testTypeUnionParam1 */
29
38
int |float $ paramA /* testBitwiseOrParamDefaultValue */ = CONSTANT_A | CONSTANT_B ,
@@ -35,6 +44,15 @@ class TypeUnion
35
44
return (($ a1 ^ $ b1 ) |($ a2 ^ $ b2 )) + $ c ;
36
45
}
37
46
47
+ public function identifierNames (
48
+ /* testTypeUnionParamNamespaceRelative */
49
+ namespace \Sub \NameA |namespace \Sub \NameB $ paramA ,
50
+ /* testTypeUnionParamPartiallyQualified */
51
+ Partially \Qualified \NameA |Partially \Qualified \NameB $ paramB ,
52
+ /* testTypeUnionParamFullyQualified */
53
+ \Fully \Qualified \NameA |\Fully \Qualified \NameB $ paramC ,
54
+ ) {}
55
+
38
56
/* testTypeUnionReturnType */
39
57
public function returnType () : int |false {}
40
58
@@ -43,6 +61,15 @@ class TypeUnion
43
61
44
62
/* testTypeUnionAbstractMethodReturnType1 */
45
63
abstract public function abstractMethod (): object |array /* testTypeUnionAbstractMethodReturnType2 */ |false ;
64
+
65
+ /* testTypeUnionReturnTypeNamespaceRelative */
66
+ public function identifierNamesReturnRelative () : namespace \Sub \NameA |namespace \Sub \NameB {}
67
+
68
+ /* testTypeUnionReturnPartiallyQualified */
69
+ public function identifierNamesReturnPQ () : Partially \Qualified \NameA |Partially \Qualified \NameB {}
70
+
71
+ /* testTypeUnionReturnFullyQualified */
72
+ public function identifierNamesReturnFQ () : \Fully \Qualified \NameA |\Fully \Qualified \NameB {}
46
73
}
47
74
48
75
/* testTypeUnionClosureParamIllegalNullable */
0 commit comments