Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • LIGO LIGO
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 170
    • Issues 170
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 44
    • Merge requests 44
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ligolang
  • LIGOLIGO
  • Merge requests
  • !1660

Typer : Better locations

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Rémi requested to merge wrong_propagation_of_tv_opt into dev Mar 24, 2022
  • Overview 1
  • Commits 6
  • Pipelines 8
  • Changes 13

type:fixed

problems

  • tv_opt was not propagated in checking.ml on E_let_in and E_lambda
  • E_ascription was weird (a very old piece of code was hidding there)

effect of the fix

I couldn't find a buggy program, but this gives more precise errors (see promoted tests), for instance:

before:

> ligo print ast-typed src/test/contracts/negative/deep_pattern_matching/pm_fail8.mligo
File "src/test/contracts/negative/deep_pattern_matching/pm_fail8.mligo", line 18, characters 8-15:
 17 |         let f = fun (b:int) -> b + a in
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 18 |         f (b+1)
              ^^^^^^^
 19 |       | Cons (a,b) -> "invalid"

Invalid type(s).
Expected: "string", but got: "int". 

now:

> ligo print ast-typed src/test/contracts/negative/deep_pattern_matching/pm_fail8.mligo
File "src/test/contracts/negative/deep_pattern_matching/pm_fail8.mligo", line 18, characters 8-15:
 17 |         let f = fun (b:int) -> b + a in
 18 |         f (b+1)
              ^^^^^^^
 19 |       | Cons (a,b) -> "invalid"

Invalid type(s).
Expected: "string", but got: "int". 

Description details:

Improve error message locations for some type errors

Edited Mar 25, 2022 by Rémi
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: wrong_propagation_of_tv_opt