diff --git a/pydantic/schema.py b/pydantic/schema.py
--- a/pydantic/schema.py
+++ b/pydantic/schema.py
@@ -951,7 +951,7 @@ def get_annotation_with_constraints(annotation: Any, field_info: FieldInfo) -> T
 
     def go(type_: Any) -> Type[Any]:
         if (
-            is_literal_type(annotation)
+            is_literal_type(type_)
             or isinstance(type_, ForwardRef)
             or lenient_issubclass(type_, (ConstrainedList, ConstrainedSet))
         ):

diff --git a/tests/test_validators.py b/tests/test_validators.py
--- a/tests/test_validators.py
+++ b/tests/test_validators.py
@@ -2,7 +2,7 @@
 from datetime import datetime
 from enum import Enum
 from itertools import product
-from typing import Dict, List, Optional, Tuple
+from typing import Dict, List, Optional, Tuple, Union
 
 import pytest
 from typing_extensions import Literal
@@ -1202,6 +1202,15 @@ class Model(BaseModel):
     ]
 
 
+def test_union_literal_with_constraints():
+    class Model(BaseModel, validate_assignment=True):
+        x: Union[Literal[42], Literal['pika']] = Field(allow_mutation=False)
+
+    m = Model(x=42)
+    with pytest.raises(TypeError):
+        m.x += 1
+
+
 def test_field_that_is_being_validated_is_excluded_from_validator_values(mocker):
     check_values = mocker.MagicMock()
 

passing `max_items` in `Field` with a `List[Literal["something"]` field raises `TypeError`
### Checks

* [x] I added a descriptive title to this issue
* [x] I have searched (google, github) for similar issues and couldn't find anything
* [x] I have read and followed [the docs](https://pydantic-docs.helpmanual.io/) and still think this is a bug

# Bug

Output of `python -c "import pydantic.utils; print(pydantic.utils.version_info())"`:
```
pydantic version: 1.8.2
pydantic compiled: True
install path: /home/ubuntu/.local/lib/python3.8/site-packages/pydantic
python version: 3.8.5 (default, May 27 2021, 13:30:53)  [GCC 9.3.0]
platform: Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-glibc2.29
optional deps. installed: ['typing-extensions']
```

passing `max_items` raises an error only when the field type is `List[Literal["something"]`.

expectation: passing `max_items` would not raise an error or would raise a more readable error

```py
Python 3.8.5 (default, May 27 2021, 13:30:53)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from pydantic import BaseModel, Field
>>> from typing import List, Literal
>>> class MyModel(BaseModel):
...     it: List[Literal["hi", "hello"]] = Field(max_items=2)
...
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "pydantic/main.py", line 299, in pydantic.main.ModelMetaclass.__new__
  File "pydantic/fields.py", line 410, in pydantic.fields.ModelField.infer
  File "pydantic/schema.py", line 920, in pydantic.schema.get_annotation_from_field_info
  File "pydantic/schema.py", line 1015, in pydantic.schema.get_annotation_with_constraints
  File "pydantic/schema.py", line 967, in pydantic.schema.get_annotation_with_constraints.go
  File "pydantic/schema.py", line 965, in pydantic.schema.get_annotation_with_constraints.go
  File "/usr/lib/python3.8/typing.py", line 774, in __subclasscheck__
    return issubclass(cls, self.__origin__)
TypeError: issubclass() arg 1 must be a class

>>> class MyModel(BaseModel):
...     it: List[Literal["hi", "hello"]] = Field(description="here")
...

>>> class MyModel(BaseModel):
...     it: List[str] = Field(max_items=2)
...
```

Thanks for all help and the work you are doing with this library. We truly appreciate it.


tests/test_validators.py::test_union_literal_with_constraints
tests/test_validators.py::test_simple tests/test_validators.py::test_int_validation tests/test_validators.py::test_frozenset_validation tests/test_validators.py::test_deque_validation tests/test_validators.py::test_validate_whole tests/test_validators.py::test_validate_kwargs tests/test_validators.py::test_validate_pre_error tests/test_validators.py::test_validating_assignment_ok tests/test_validators.py::test_validating_assignment_fail tests/test_validators.py::test_validating_assignment_value_change tests/test_validators.py::test_validating_assignment_extra tests/test_validators.py::test_validating_assignment_dict tests/test_validators.py::test_validating_assignment_values_dict tests/test_validators.py::test_validate_multiple tests/test_validators.py::test_classmethod tests/test_validators.py::test_duplicates tests/test_validators.py::test_use_bare tests/test_validators.py::test_use_no_fields tests/test_validators.py::test_validate_always tests/test_validators.py::test_validate_always_on_inheritance tests/test_validators.py::test_validate_not_always tests/test_validators.py::test_wildcard_validators tests/test_validators.py::test_wildcard_validator_error tests/test_validators.py::test_invalid_field tests/test_validators.py::test_validate_child tests/test_validators.py::test_validate_child_extra tests/test_validators.py::test_validate_child_all tests/test_validators.py::test_validate_parent tests/test_validators.py::test_validate_parent_all tests/test_validators.py::test_inheritance_keep tests/test_validators.py::test_inheritance_replace tests/test_validators.py::test_inheritance_new tests/test_validators.py::test_validation_each_item tests/test_validators.py::test_validation_each_item_one_sublevel tests/test_validators.py::test_key_validation tests/test_validators.py::test_validator_always_optional tests/test_validators.py::test_validator_always_pre tests/test_validators.py::test_validator_always_post tests/test_validators.py::test_validator_always_post_optional tests/test_validators.py::test_datetime_validator tests/test_validators.py::test_pre_called_once tests/test_validators.py::test_make_generic_validator[fields0-_v_] tests/test_validators.py::test_make_generic_validator[fields1-_v_] tests/test_validators.py::test_make_generic_validator[fields2-_v_,_field_] tests/test_validators.py::test_make_generic_validator[fields3-_v_,_config_] tests/test_validators.py::test_make_generic_validator[fields4-_v_,_values_] tests/test_validators.py::test_make_generic_validator[fields5-_v_,_field_,_config_] tests/test_validators.py::test_make_generic_validator[fields6-_v_,_field_,_values_] tests/test_validators.py::test_make_generic_validator[fields7-_v_,_config_,_values_] tests/test_validators.py::test_make_generic_validator[fields8-_v_,_field_,_values_,_config_] tests/test_validators.py::test_make_generic_validator[fields9-_cls_,_v_] tests/test_validators.py::test_make_generic_validator[fields10-_cls_,_v_] tests/test_validators.py::test_make_generic_validator[fields11-_cls_,_v_,_field_] tests/test_validators.py::test_make_generic_validator[fields12-_cls_,_v_,_config_] tests/test_validators.py::test_make_generic_validator[fields13-_cls_,_v_,_values_] tests/test_validators.py::test_make_generic_validator[fields14-_cls_,_v_,_field_,_config_] tests/test_validators.py::test_make_generic_validator[fields15-_cls_,_v_,_field_,_values_] tests/test_validators.py::test_make_generic_validator[fields16-_cls_,_v_,_config_,_values_] tests/test_validators.py::test_make_generic_validator[fields17-_cls_,_v_,_field_,_values_,_config_] tests/test_validators.py::test_make_generic_validator_kwargs tests/test_validators.py::test_make_generic_validator_invalid tests/test_validators.py::test_make_generic_validator_cls_kwargs tests/test_validators.py::test_make_generic_validator_cls_invalid tests/test_validators.py::test_make_generic_validator_self tests/test_validators.py::test_assert_raises_validation_error tests/test_validators.py::test_whole tests/test_validators.py::test_root_validator tests/test_validators.py::test_root_validator_pre tests/test_validators.py::test_root_validator_repeat tests/test_validators.py::test_root_validator_repeat2 tests/test_validators.py::test_root_validator_self tests/test_validators.py::test_root_validator_extra tests/test_validators.py::test_root_validator_types tests/test_validators.py::test_root_validator_inheritance tests/test_validators.py::test_root_validator_returns_none_exception tests/test_validators.py::test_reuse_global_validators tests/test_validators.py::test_allow_reuse[True-True-True-True] tests/test_validators.py::test_allow_reuse[True-True-True-False] tests/test_validators.py::test_allow_reuse[True-True-False-True] tests/test_validators.py::test_allow_reuse[True-True-False-False] tests/test_validators.py::test_allow_reuse[True-False-True-True] tests/test_validators.py::test_allow_reuse[True-False-True-False] tests/test_validators.py::test_allow_reuse[True-False-False-True] tests/test_validators.py::test_allow_reuse[True-False-False-False] tests/test_validators.py::test_allow_reuse[False-True-True-True] tests/test_validators.py::test_allow_reuse[False-True-True-False] tests/test_validators.py::test_allow_reuse[False-True-False-True] tests/test_validators.py::test_allow_reuse[False-True-False-False] tests/test_validators.py::test_allow_reuse[False-False-True-True] tests/test_validators.py::test_allow_reuse[False-False-True-False] tests/test_validators.py::test_allow_reuse[False-False-False-True] tests/test_validators.py::test_allow_reuse[False-False-False-False] tests/test_validators.py::test_root_validator_classmethod[True-True] tests/test_validators.py::test_root_validator_classmethod[True-False] tests/test_validators.py::test_root_validator_classmethod[False-True] tests/test_validators.py::test_root_validator_classmethod[False-False] tests/test_validators.py::test_root_validator_skip_on_failure tests/test_validators.py::test_assignment_validator_cls tests/test_validators.py::test_literal_validator tests/test_validators.py::test_literal_validator_str_enum tests/test_validators.py::test_nested_literal_validator tests/test_validators.py::test_field_that_is_being_validated_is_excluded_from_validator_values tests/test_validators.py::test_exceptions_in_field_validators_restore_original_field_value