-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
196 additions
and
15 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
54 changes: 54 additions & 0 deletions
54
src/test/fixtures/generics/general/inherit/tag/main.fixture.php
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,54 @@ | ||
<?php | ||
|
||
namespace Inherit\Tag\Main; | ||
|
||
/** @kphp-generic T */ | ||
class GenericClass {} | ||
/** @kphp-generic T, T2 */ | ||
interface GenericInterface {} | ||
|
||
class NonGenericClass {} | ||
interface NonGenericInterface {} | ||
|
||
/** | ||
* @kphp-generic T | ||
* @kphp-inherit GenericClass<T> | ||
*/ | ||
class Foo1 extends GenericClass {} | ||
|
||
/** | ||
* @kphp-generic T | ||
* @kphp-inherit GenericInterface<T, T> | ||
*/ | ||
class Foo2 implements GenericInterface {} | ||
|
||
class <error descr="Class extends or implements generic class/interface, please specify @kphp-inherit">Foo3</error> implements GenericInterface {} | ||
|
||
/** | ||
* @kphp-generic T | ||
*/ | ||
class <error descr="Class extends or implements generic class/interface, please specify @kphp-inherit">Foo4</error> implements GenericInterface {} | ||
|
||
/** | ||
* @kphp-generic T | ||
* @kphp-inherit GenericInterface<T, T> | ||
*/ | ||
class Foo5 extends <error descr="Class extends generic class/interface, but this class not specified in @kphp-inherit">GenericClass</error> implements GenericInterface {} | ||
|
||
/** | ||
* @kphp-generic T | ||
* @kphp-inherit <error descr="Class/interface \Inherit\Tag\Main\GenericClass not extended or implemented class/interface Foo6">GenericClass<T></error> | ||
*/ | ||
class Foo6 extends NonGenericClass {} | ||
|
||
/** | ||
* @kphp-generic T | ||
* @kphp-inherit <error descr="Class/interface \Inherit\Tag\Main\GenericInterface not extended or implemented class/interface Foo7">GenericInterface<T, T></error> | ||
*/ | ||
class Foo7 implements NonGenericInterface {} | ||
|
||
/** | ||
* @kphp-generic T | ||
* @kphp-inherit <error descr="It is not necessary to specify not generic class/interface \Inherit\Tag\Main\NonGenericInterface in @kphp-inherit">NonGenericInterface</error> | ||
*/ | ||
class Foo8 implements NonGenericInterface {} |
56 changes: 56 additions & 0 deletions
56
src/test/fixtures/generics/general/inherit/tag/main.qf.php
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,56 @@ | ||
<?php | ||
|
||
namespace Inherit\Tag\Main; | ||
|
||
/** @kphp-generic T */ | ||
class GenericClass {} | ||
/** @kphp-generic T, T2 */ | ||
interface GenericInterface {} | ||
|
||
class NonGenericClass {} | ||
interface NonGenericInterface {} | ||
|
||
/** | ||
* @kphp-generic T | ||
* @kphp-inherit GenericClass<T> | ||
*/ | ||
class Foo1 extends GenericClass {} | ||
|
||
/** | ||
* @kphp-generic T | ||
* @kphp-inherit GenericInterface<T, T> | ||
*/ | ||
class Foo2 implements GenericInterface {} | ||
|
||
/** | ||
* @kphp-generic T | ||
* @kphp-inherit GenericInterface<T, T> | ||
*/ | ||
class Foo3 implements GenericInterface {} | ||
|
||
/** | ||
* @kphp-generic T | ||
* @kphp-inherit GenericInterface<T, T> | ||
*/ | ||
class Foo4 implements GenericInterface {} | ||
|
||
/** | ||
* @kphp-generic T | ||
* @kphp-inherit GenericClass<T>, GenericInterface<T, T> | ||
*/ | ||
class Foo5 extends GenericClass implements GenericInterface {} | ||
|
||
/** | ||
* @kphp-generic T | ||
*/ | ||
class Foo6 extends NonGenericClass {} | ||
|
||
/** | ||
* @kphp-generic T | ||
*/ | ||
class Foo7 implements NonGenericInterface {} | ||
|
||
/** | ||
* @kphp-generic T | ||
*/ | ||
class Foo8 implements NonGenericInterface {} |
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