-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes OOB in type_check_analyze of ImplTrait.
An unused line of code was throwing an OOB panic because of parser error. Removing the unused line of code fixes the issue. Fixes #6331
- Loading branch information
Showing
5 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
test/src/e2e_vm_tests/test_programs/should_fail/mismatch_closing_delimiters/Forc.lock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[[package]] | ||
name = "core" | ||
source = "path+from-root-F62FA9D54ABC8F01" | ||
|
||
[[package]] | ||
name = "mismatch_closing_delimiters" | ||
source = "member" | ||
dependencies = ["core"] |
9 changes: 9 additions & 0 deletions
9
test/src/e2e_vm_tests/test_programs/should_fail/mismatch_closing_delimiters/Forc.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[project] | ||
authors = ["Fuel Labs <[email protected]>"] | ||
license = "Apache-2.0" | ||
name = "mismatch_closing_delimiters" | ||
entry = "main.sw" | ||
implicit-std = false | ||
|
||
[dependencies] | ||
core = { path = "../../../../../../sway-lib-core" } |
14 changes: 14 additions & 0 deletions
14
test/src/e2e_vm_tests/test_programs/should_fail/mismatch_closing_delimiters/src/main.sw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
script; | ||
|
||
struct Struct{x:u} | ||
impl Struct{ | ||
fn w()->f{{(()}} | ||
trait Supertrait{} | ||
impl Supertrait for Struct{) | ||
} | ||
|
||
fn s<A>(b:B) where A:t{}fn n(){} | ||
|
||
fn main() -> u64 { | ||
0 | ||
} |
4 changes: 4 additions & 0 deletions
4
test/src/e2e_vm_tests/test_programs/should_fail/mismatch_closing_delimiters/test.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
category = "fail" | ||
|
||
# check: $()fn w()->f{{(()}} | ||
# nextln: $()mismatched delimiters |