# AstGen: don't coerce inputs to usize in asmExpr · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/ebafdb958c1aa6b41c28fc7d45f44e38a69a3bd5)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: ebafdb958c1aa6b41c28fc7d45f44e38a69a3bd5

Requested commit: ebafdb958c1aa6b41c28fc7d45f44e38a69a3bd5

Commit: ebafdb958c1aa6b41c28fc7d45f44e38a69a3bd5

Tree: f61152ba5bbd2fe77fbfcdedc9e876a5d982550b

Author: Daniele Cocca

Committer: Veikka Tuominen

## Message

```
AstGen: don't coerce inputs to usize in asmExpr

Instead, use ResultLoc.none to allow for the expression type to be
inferred [^1]. This effectively moves the type coercion to Sema, in
order to turn comptime values into usable values for the backends to
consume. Right now the coercion is applies as comptime_int -> usize and
comptime_float -> f64, as an arbitrary choice.

[^1]: https://github.com/ziglang/zig/blob/9f25c8140cb859fcea7023362afcb29b1e4df41f/src/AstGen.zig#L207-L208

```

## Parents

- [633fe41a2c2310d8cfab53ee9d87bb50ac4efc41](https://git.cafe/gitcafe/zig/commit/633fe41a2c2310d8cfab53ee9d87bb50ac4efc41?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/ebafdb958c1aa6b41c28fc7d45f44e38a69a3bd5?format=markdown)
