-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Suggest most similar function id when we can't find a function type
Find identifier with smallest optimal string alignment (OSA) distance (within reason) and suggest it. The max difference is the identifier length - 3 clamped between 1 and 4. So a 4 character identifier will only suggest 1 change edits, a 5 character identifier 2 character edits and so on up to 4 edits.
- Loading branch information
Showing
9 changed files
with
90 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
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
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
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,7 @@ | ||
[93mType error[0m: | ||
[96mfail/no_function.sail[0m:10.10-17: | ||
10[96m |[0m let _ = foo_baz() | ||
[91m |[0m [91m^-----^[0m | ||
[91m |[0m No function type found for foo_baz | ||
[91m |[0m | ||
[91m |[0m Did you mean foo_bar? |
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,11 @@ | ||
default Order dec | ||
|
||
$include <prelude.sail> | ||
|
||
val foo_quux : unit -> unit | ||
|
||
val foo_bar : unit -> unit | ||
|
||
function test() -> unit = { | ||
let _ = foo_baz() | ||
} |
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,7 @@ | ||
[93mType error[0m: | ||
[96mfail/no_function2.sail[0m:8.10-17: | ||
8[96m |[0m let _ = foo_baz() | ||
[91m |[0m [91m^-----^[0m | ||
[91m |[0m No function type found for foo_baz | ||
[91m |[0m | ||
[91m |[0m Did you mean foo_quux? |
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 @@ | ||
default Order dec | ||
|
||
$include <prelude.sail> | ||
|
||
val foo_quux : unit -> unit | ||
|
||
function test() -> unit = { | ||
let _ = foo_baz() | ||
} |
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,5 @@ | ||
[93mType error[0m: | ||
[96mfail/no_function3.sail[0m:6.10-17: | ||
6[96m |[0m let _ = foo_baz() | ||
[91m |[0m [91m^-----^[0m | ||
[91m |[0m No function type found for foo_baz |
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,7 @@ | ||
default Order dec | ||
|
||
$include <prelude.sail> | ||
|
||
function test() -> unit = { | ||
let _ = foo_baz() | ||
} |