Skip to content

Commit 31ea9a2

Browse files
committed
Regression test
1 parent 9a8738d commit 31ea9a2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/PHPStan/Analyser/data/type-aliases.php

+7
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ class Qux
6565
* @phpstan-type RecursiveTypeAlias RecursiveTypeAlias[]
6666
* @phpstan-type CircularTypeAlias1 CircularTypeAlias2
6767
* @phpstan-type CircularTypeAlias2 CircularTypeAlias1
68+
* @phpstan-type int ShouldNotHappen
6869
* @property GlobalTypeAlias $globalAliasProperty
6970
* @property LocalTypeAlias $localAliasProperty
7071
* @property ImportedTypeAlias $importedAliasProperty
@@ -141,6 +142,12 @@ public function __get(string $name)
141142
return null;
142143
}
143144

145+
/** @param int $int */
146+
public function testIntAlias($int)
147+
{
148+
assertType('int', $int);
149+
}
150+
144151
}
145152

146153
assertType('int|string', (new Foo)->globalAliasProperty);

0 commit comments

Comments
 (0)