Skip to content

Improve error when implicit is solved to ghost value #319

Open
@mtzguido

Description

@mtzguido
#lang-pulse
open Pulse

fn foo (r : ref int) (#x : int)
  requires pts_to r x
  ensures  pts_to r x
{ () }

fn test (r : ref int) (#x : erased int)
  requires pts_to r x
  ensures  pts_to r x
{
  foo r;
}

The previous snippet should fail indeed, since we can't reveal x, but the error is not very informative:

- prover error
- For term (<stapp>foo r #x) implicit solution x has ghost effect

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions