diff --git a/pyflakes/checker.py b/pyflakes/checker.py
index ae15621..56fc3ca 100644
--- a/pyflakes/checker.py
+++ b/pyflakes/checker.py
@@ -2265,7 +2265,6 @@ class Checker:
             self.scope[node.name] = prev_definition
 
     def ANNASSIGN(self, node):
-        self.handleNode(node.target, node)
         self.handleAnnotation(node.annotation, node)
         # If the assignment has value, handle the *value* now.
         if node.value:
@@ -2274,6 +2273,7 @@ class Checker:
                 self.handleAnnotation(node.value, node)
             else:
                 self.handleNode(node.value, node)
+        self.handleNode(node.target, node)
 
     def COMPARE(self, node):
         left = node.left

diff --git a/pyflakes/test/test_type_annotations.py b/pyflakes/test/test_type_annotations.py
index 3775cd3..d881205 100644
--- a/pyflakes/test/test_type_annotations.py
+++ b/pyflakes/test/test_type_annotations.py
@@ -298,6 +298,11 @@ class TestTypeAnnotations(TestCase):
         a: 'a: "A"'
         ''', m.ForwardAnnotationSyntaxError)
 
+    def test_variable_annotation_references_self_name_undefined(self):
+        self.flakes("""
+        x: int = x
+        """, m.UndefinedName)
+
     def test_TypeAlias_annotations(self):
         self.flakes("""
         from typing_extensions import TypeAlias

annotated variable hides "undefined name"
this works:

```console
$ pyflakes /dev/stdin <<< 'x = x'
/dev/stdin:1:5: undefined name 'x'
$
```

this does not:

```console
$ pyflakes /dev/stdin <<< 'x: int = x'
$
```
pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_variable_annotation_references_self_name_undefined
pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_TypeAlias_annotations pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_aliased_import pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_annotated_async_def pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_annotated_type_typing_missing_forward_type pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_annotated_type_typing_missing_forward_type_multiple_args pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_annotated_type_typing_with_string_args pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_annotated_type_typing_with_string_args_in_union pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_annotating_an_import pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_deferred_twice_annotation pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_idomiatic_typing_guards pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_literal_type_some_other_module pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_literal_type_typing pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_literal_type_typing_extensions pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_literal_union_type_typing pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_namedtypes_classes pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_nested_partially_quoted_type_assignment pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_not_a_typing_overload pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_overload_in_class pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_overload_with_multiple_decorators pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_partial_string_annotations_with_future_annotations pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_partially_quoted_type_annotation pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_partially_quoted_type_assignment pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_positional_only_argument_annotations pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_postponed_annotations pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_quoted_TypeVar_bound pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_quoted_TypeVar_constraints pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_quoted_type_cast pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_quoted_type_cast_renamed_import pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_return_annotation_is_class_scope_variable pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_return_annotation_is_function_body_variable pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_typeCommentsAdditionalComment pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_typeCommentsAssignedToPreviousNode pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_typeCommentsFullSignature pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_typeCommentsFullSignatureWithDocstring pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_typeCommentsInvalidDoesNotMarkAsUsed pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_typeCommentsMarkImportsAsUsed pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_typeCommentsNoWhitespaceAnnotation pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_typeCommentsStarArgs pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_typeCommentsSyntaxError pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_typeCommentsSyntaxErrorCorrectLine pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_typeIgnore pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_typeIgnoreBogus pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_typeIgnoreBogusUnicode pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_type_annotation_clobbers_all pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_type_cast_literal_str_to_str pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_typednames_correct_forward_ref pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_typingExtensionsOverload pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_typingOverload pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_typingOverloadAsync pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_typing_guard_for_protocol pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_unused_annotation pyflakes/test/test_type_annotations.py::TestTypeAnnotations::test_variable_annotations