Skip to content

Return-by-reference round-trip failure #972

Closed
@jruderman

Description

@jruderman
fn getx(a: {x: int}, _b: int) -> &!1 int { ret a.x; }
fn main() { assert getx({x:3}, 4) == 3; }

The first line is pretty-printed without a space:

fn getx(a: {x: int}, _b: int) -> &!1int { ret a.x; }

And then the "i" in "int" gets eaten:

fn getx(a: {x: int}, _b: int) -> &!1nt { ret a.x; }

I'm not sure which step is the bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-prettyArea: Pretty printing (including `-Z unpretty`)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions