[red-knot] Do not panic when encountering string annotations (#14091)

## Summary

Encountered this while running red-knot benchmarks on the `black`
codebase.

Fixes two of the issues in #13478.

## Test Plan

Added a regression test.
This commit is contained in:
David Peter
2024-11-04 15:06:54 +01:00
committed by GitHub
parent df45a0e3f9
commit 6dabf045c3
2 changed files with 13 additions and 1 deletions

View File

@@ -0,0 +1,9 @@
# String annotations
```py
def f() -> "int":
return 1
# TODO: We do not support string annotations, but we should not panic if we encounter them
reveal_type(f()) # revealed: @Todo
```