diff --git a/src/Rules/Classes/AccessStaticPropertiesRule.php b/src/Rules/Classes/AccessStaticPropertiesRule.php
index <HASH>..<HASH> 100644
--- a/src/Rules/Classes/AccessStaticPropertiesRule.php
+++ b/src/Rules/Classes/AccessStaticPropertiesRule.php
@@ -32,7 +32,11 @@ class AccessStaticPropertiesRule implements \PHPStan\Rules\Rule
 	 */
 	public function processNode(Node $node, Scope $scope): array
 	{
-		$name = (string) $node->name;
+		if (!is_string($node->name)) {
+			return [];
+		}
+
+		$name = $node->name;
 		$currentClass = $scope->getClass();
 		if ($currentClass === null) {
 			return [];
diff --git a/tests/PHPStan/Rules/Classes/data/access-static-properties.php b/tests/PHPStan/Rules/Classes/data/access-static-properties.php
index <HASH>..<HASH> 100644
--- a/tests/PHPStan/Rules/Classes/data/access-static-properties.php
+++ b/tests/PHPStan/Rules/Classes/data/access-static-properties.php
@@ -41,6 +41,7 @@ class IpsumAccessStaticProperties
 		parent::$lorem; // does not have a parent
 		FooAccessStaticProperties::$test;
 		FooAccessStaticProperties::$foo; // protected and not from a parent
+		FooAccessStaticProperties::$$foo;
 	}
 
 }
Fixed checking access to static properties with dynamic name