Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split TemplateType::isSubTypeOf() and TemplateType::isAcceptedBy()
- Loading branch information
1 parent
bd4f179
commit 35606f9
Showing
8 changed files
with
134 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php declare(strict_types = 1); | ||
|
||
namespace Bug6589; | ||
|
||
class Field {} | ||
|
||
class Field2 extends Field {} | ||
|
||
/** | ||
* @template TField of Field2 | ||
*/ | ||
class HelloWorldTemplated | ||
{ | ||
/** @return TField */ | ||
public function getField() | ||
{ | ||
return new Field(); | ||
} | ||
|
||
/** @return TField */ | ||
public function getField2() | ||
{ | ||
return new Field2(); | ||
} | ||
} | ||
|
||
class HelloWorldSimple | ||
{ | ||
public function getField(string $name): Field2 | ||
{ | ||
return new Field(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters