Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: AssemblyScript/assemblyscript
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.27.11
Choose a base ref
...
head repository: AssemblyScript/assemblyscript
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.27.12
Choose a head ref
  • 1 commit
  • 3 files changed
  • 1 contributor

Commits on Oct 7, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    e3e4166 View commit details
Showing with 14 additions and 1 deletion.
  1. +1 −1 src/resolver.ts
  2. +7 −0 tests/compiler/issues/2707.json
  3. +6 −0 tests/compiler/issues/2707.ts
2 changes: 1 addition & 1 deletion src/resolver.ts
Original file line number Diff line number Diff line change
@@ -392,7 +392,7 @@ export class Resolver extends DiagnosticEmitter {
break;
}
case ParameterKind.Rest: {
assert(i == numParameters);
assert(i == numParameters - 1);
hasRest = true;
break;
}
7 changes: 7 additions & 0 deletions tests/compiler/issues/2707.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"asc_flags": [],
"stderr": [
"AS100: Not implemented: Rest parameters",
"func(1, 2, 3, 4);"
]
}
6 changes: 6 additions & 0 deletions tests/compiler/issues/2707.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// should not crash
let func: (...args: i32[]) => i32 = (...args: i32[]) => {
return 1;
};

func(1, 2, 3, 4);