Skip to content

Commit 337205b

Browse files
committed
Simplify code, rewriting names to base type is no longer necessary
See https://github.com/xp-framework/compiler/releases/tag/v8.8.2
1 parent dd0b43d commit 337205b

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

ChangeLog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ XP generics for PHP - ChangeLog
33

44
## ?.?.? / ????-??-??
55

6+
## 0.5.0 / 2023-02-12
7+
8+
* Migrated to new test framework, see xp-framework/rfc#344 - @thekid
9+
* Merged PR #5: Extend generic parent with type arguments - @thekid
10+
611
## 0.4.0 / 2022-11-07
712

813
* Use release version of `xp-framework/compiler` - @thekid

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"minimum-stability": "dev",
99
"require" : {
1010
"xp-framework/core": "^11.4",
11-
"xp-framework/compiler": "^8.6",
11+
"xp-framework/compiler": "^8.8",
1212
"php" : ">=7.0.0"
1313
},
1414
"require-dev" : {

src/main/php/lang/ast/syntax/php/Generics.class.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public static function components($types) {
4646
*
4747
* @param lang.ast.Type[] $list
4848
* @param lang.ast.Type[] $components
49-
* @return ?string
49+
* @return ?string[]
5050
*/
5151
private static function generics($list, $components) {
5252
$contained= false;
@@ -177,8 +177,6 @@ public static function type($type, $values) {
177177
self::annotate($method, self::method($method, $type->name->components));
178178
}
179179

180-
// Rewrite class name to the generic's base type
181-
$type->name= $type->name->base;
182180
return $type;
183181
}
184182

0 commit comments

Comments
 (0)