---
source: crates/red_knot_test/src/lib.rs
expression: snapshot
---
---
mdtest name: invalid_argument_type.md - Invalid argument type diagnostics - Tests for a variety of argument types - Only positional
mdtest path: crates/red_knot_python_semantic/resources/mdtest/diagnostics/invalid_argument_type.md
---

# Python source files

## mdtest_snippet.py

```
1 | def foo(x: int, y: int, z: int, /) -> int:
2 |     return x * y * z
3 | 
4 | foo(1, "hello", 3)  # error: [invalid-argument-type]
```

# Diagnostics

```
error: lint:invalid-argument-type: Argument to this function is incorrect
 --> /src/mdtest_snippet.py:4:8
  |
2 |     return x * y * z
3 |
4 | foo(1, "hello", 3)  # error: [invalid-argument-type]
  |        ^^^^^^^ Expected `int`, found `Literal["hello"]`
  |
info: Function defined here
 --> /src/mdtest_snippet.py:1:5
  |
1 | def foo(x: int, y: int, z: int, /) -> int:
  |     ^^^         ------ Parameter declared here
2 |     return x * y * z
  |

```
