-
Notifications
You must be signed in to change notification settings - Fork 660
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Broken parsing of '@template of I' followed by a simple comment #3416
Labels
Comments
I found these snippets: https://psalm.dev/r/f5aa676997<?php
interface I {};
/**
* @template T of I
*
* test
*/
class MyContainer {
/** @var T */
private $value;
/** @param T $value */
public function __construct($value) {
$this->value = $value;
}
/** @return T */
public function getValue() {
return $this->value;
}
}
https://psalm.dev/r/74b00ac705<?php
interface I {};
/**
* @template T
*
* test
*/
class MyContainer {
/** @var T */
private $value;
/** @param T $value */
public function __construct($value) {
$this->value = $value;
}
/** @return T */
public function getValue() {
return $this->value;
}
}
|
muglug
added
the
easy problems
Issues that can be fixed without background knowledge of Psalm
label
May 22, 2020
elnoro
added a commit
to elnoro/psalm
that referenced
this issue
Feb 22, 2021
elnoro
added a commit
to elnoro/psalm
that referenced
this issue
Feb 22, 2021
elnoro
added a commit
to elnoro/psalm
that referenced
this issue
Feb 23, 2021
elnoro
added a commit
to elnoro/psalm
that referenced
this issue
Feb 23, 2021
Looks like this was resolved with #9506 |
It was! Thanks :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
When
@template of
is followed by a simple comment on a next line, psalm fails to stop parsing the template tag, and continues to the next line, making the comment part ofof I
https://psalm.dev/r/f5aa676997
Without 'of I' everything is parsed properly
https://psalm.dev/r/74b00ac705
Same applies for at least one more tag -
@extends
The text was updated successfully, but these errors were encountered: