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 172
    • Issues 172
    • 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
  • !1256

Fix C_POLYMORPHIC_ADD resolution to C_CONCAT/C_ADD

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged E. Rivas requested to merge er433/fix/polymorphic_add into dev Aug 19, 2021
  • Overview 1
  • Commits 2
  • Pipelines 3
  • Changes 2

This MR is a fix for an issue related to helping JsLIGO infer whether C_POLYMORPHIC_ADD should resolve to C_CONCAT / C_ADD:

The code

let s = String.sub(0 as nat, 1 as nat, "hello") + String.sub(1 as nat, 1 as nat, "hello")

will output

Invalid arguments.
Expected an argument of type (bls12_381_g1, bls12_381_g1) or (bls12_381_g2, bls12_381_g2) or (bls12_381_fr, bls12_381_fr) or (nat, nat) or (int, int) or (tez, tez) or (nat, int) or (int, nat) or (timestamp, int) or (int, timestamp), but got an argument of type string, string. 

because C_POLYMORPHIC_ADD gets resolved to C_ADD instead of C_CONCAT.

  • has a changelog entry
Edited Aug 20, 2021 by E. Rivas
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: er433/fix/polymorphic_add