Set construction syntax no longer works for generic parameter
### Description

The following two cases work up to 2.0.12 but fail since 2.2.0:
```nim
type E = enum A
proc foo[T](t: set[T] = {T.A}) =
  discard
foo[E]()

proc bar[T](t: set[T] = {T(0)}) =
  discard
bar[uint8]()
```

### Nim Version

Tested with choosenim versions 2.0.12, 2.2.0, and devel git hash: 5340005869d513e5c6af06e5d963bcb77abb3fa3

### Current Output

```text
Error: ordinal type expected; given: typeof(T.A)
Error: type mismatch: got 'typeof(T.A)' for 'T.A' but expected 'range 0..65535(int)'
Error: ordinal type expected; given: typeof(T(0))
Error: type mismatch: got 'typeof(T(0))' for 'T(0)' but expected 'range 0..65535(int)'
```


### Expected Output

_No response_

### Known Workarounds


 A workaround:
```nim
template Tset(T: typedesc): untyped =
  {T(0)}

proc bar2[T](t: set[T] = Tset(T)) =
  discard
bar2[E]()
```

### Additional Information

_No response_