Skip to content

chore: Improve unary error#2199

Merged
jfecher merged 3 commits intomasterfrom
e/unary_error
Aug 7, 2023
Merged

chore: Improve unary error#2199
jfecher merged 3 commits intomasterfrom
e/unary_error

Conversation

@Ethan-000
Copy link
Contributor

@Ethan-000 Ethan-000 commented Aug 7, 2023

Description

Problem*

Resolves #2152

Summary*

fn main() {
    let a = -[1,2];
}

will now return

[Field; 2] cannot be used in an unary operation

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

jfecher
jfecher previously approved these changes Aug 7, 2023
@jfecher jfecher enabled auto-merge August 7, 2023 13:54
@jfecher jfecher disabled auto-merge August 7, 2023 13:54
@jfecher jfecher enabled auto-merge August 7, 2023 13:55
@jfecher jfecher added this pull request to the merge queue Aug 7, 2023
Merged via the queue into master with commit b0def14 Aug 7, 2023
@jfecher jfecher deleted the e/unary_error branch August 7, 2023 14:45
TomAFrench added a commit that referenced this pull request Aug 7, 2023
* master:
  chore: Improve unary error (#2199)
  chore: separate integration test cases into directories based on expected result (#2198)
  chore: remove stale comment (#2197)
TomAFrench added a commit that referenced this pull request Aug 7, 2023
* master:
  chore: Improve unary error (#2199)
  chore: separate integration test cases into directories based on expected result (#2198)
  chore: remove stale comment (#2197)
TomAFrench added a commit that referenced this pull request Aug 7, 2023
* master:
  chore: Improve unary error (#2199)
  chore: separate integration test cases into directories based on expected result (#2198)
  chore: remove stale comment (#2197)
TomAFrench added a commit that referenced this pull request Aug 7, 2023
* master:
  chore: Remove symlink and dummy config file (#2200)
  fix: Fix an ICE when reassigning a mutable lambda variable to one with a different environment type (#2172)
  feat: Only create new witnesses for distinctiveness when duplicates exist (#2191)
  chore: Use helper functions for getting values of `AcirVar`s (#2194)
  feat: Add support for slices of structs and nested slices in brillig (#2084)
  feat: Perform sorting of constant arrays at compile time (#2195)
  chore: Improve unary error (#2199)
  chore: separate integration test cases into directories based on expected result (#2198)
  chore: remove stale comment (#2197)
  feat(nargo): Support custom entry points specified in TOML (#2158)
  fix(nargo): Indicate which TOML file is missing package name (#2177)
  fix: remove duplicated `name` option in `nargo new` (#2183)
  chore: add documentation to the `nargo lsp` command (#2169)
  feat(nargo)!: Require package `type` be specified in Nargo.toml (#2134)
  fix(nargo): Make dependencies section optional in TOML (#2161)
  chore: Do not create new memory block when not needed (#2142)
  fix: fix an ICE happening when we call a closure result from if/else (#2146)
  chore: remove unnecessary cloning of package dependencies (#2175)
TomAFrench added a commit that referenced this pull request Aug 7, 2023
* master: (35 commits)
  feat: Issue warning for signed integers (#2185)
  chore: Add `noir_wasm` testing workflow (#1921)
  chore: Remove symlink and dummy config file (#2200)
  fix: Fix an ICE when reassigning a mutable lambda variable to one with a different environment type (#2172)
  feat: Only create new witnesses for distinctiveness when duplicates exist (#2191)
  chore: Use helper functions for getting values of `AcirVar`s (#2194)
  feat: Add support for slices of structs and nested slices in brillig (#2084)
  feat: Perform sorting of constant arrays at compile time (#2195)
  chore: Improve unary error (#2199)
  chore: separate integration test cases into directories based on expected result (#2198)
  chore: remove stale comment (#2197)
  feat(nargo): Support custom entry points specified in TOML (#2158)
  fix(nargo): Indicate which TOML file is missing package name (#2177)
  fix: remove duplicated `name` option in `nargo new` (#2183)
  chore: add documentation to the `nargo lsp` command (#2169)
  feat(nargo)!: Require package `type` be specified in Nargo.toml (#2134)
  fix(nargo): Make dependencies section optional in TOML (#2161)
  chore: Do not create new memory block when not needed (#2142)
  fix: fix an ICE happening when we call a closure result from if/else (#2146)
  chore: remove unnecessary cloning of package dependencies (#2175)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Better error for misuse of unary operators

2 participants