docs(ir): correct stale ExprTyper comments re call result typing owner
The module doc and the `.call` arm comment still said call result typing
"stays in Lowering" and "converges in A3.2". As of 7f3a7b3 calls are routed to
CallResolver (calls.zig); update both comments to name the current owner. The
`.call` arm still delegates through Lowering.inferExprType — that's the routing
path to the owner, not a claim that Lowering owns the typing.
Comment-only. Gate: zig build, zig build test, run_examples.sh -> 356/0.
This commit is contained in:
@@ -12,8 +12,8 @@ const Lowering = lower.Lowering;
|
||||
/// literals, unary / binary ops, `try` / `catch`, `if`, block, field access,
|
||||
/// identifier / type-name, struct / tuple literals, index / slice / deref,
|
||||
/// null-coalesce, and the statement shapes that produce no value. Call result
|
||||
/// typing stays in `Lowering` for this step; it converges into `CallResolver`
|
||||
/// in A3.2.
|
||||
/// typing is owned by `CallResolver` (`calls.zig`); a call node reaching here is
|
||||
/// routed to it via `Lowering.inferExprType`.
|
||||
///
|
||||
/// A `*Lowering` facade (Principle 5), like `PackResolver`: expression typing
|
||||
/// reads live lexical-scope / pack / target-type state and dozens of resolver
|
||||
@@ -28,9 +28,9 @@ pub const ExprTyper = struct {
|
||||
/// by its one owner.
|
||||
pub fn inferType(self: ExprTyper, node: *const Node) TypeId {
|
||||
return switch (node.data) {
|
||||
// Call result typing stays in `Lowering` (A3.2 converges it into
|
||||
// `CallResolver`); delegate so a call node reaching here is handled
|
||||
// by the single owner rather than mistyped as `.unresolved`.
|
||||
// Call result typing is owned by `CallResolver` (`calls.zig`);
|
||||
// delegate through `Lowering.inferExprType` so a call node reaching
|
||||
// here is typed by that single owner, not mistyped as `.unresolved`.
|
||||
.call => self.l.inferExprType(node),
|
||||
.string_literal => .string,
|
||||
.int_literal => .s64,
|
||||
|
||||
Reference in New Issue
Block a user