mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
parent
fd9e783a37
commit
3213695c95
@ -377,7 +377,7 @@ abstract class Type
|
||||
|
||||
$was_char = true;
|
||||
} elseif ($char === '.') {
|
||||
if ($i + 1 > $c || $chars[$i + 1] !== '.' || $chars[$i + 2] !== '.') {
|
||||
if ($i + 2 > $c || $chars[$i + 1] !== '.' || $chars[$i + 2] !== '.') {
|
||||
throw new TypeParseTreeException('Unexpected token ' . $char);
|
||||
}
|
||||
|
||||
|
@ -374,6 +374,16 @@ class TypeParseTest extends TestCase
|
||||
Type::parseString('string...');
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \Psalm\Exception\TypeParseTreeException
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testBadFullStop()
|
||||
{
|
||||
Type::parseString('string.');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user