-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: do not crash when comparing type defined with 'function'
Using the plain 'function' type needs to define 'min_arity'.
- Loading branch information
Showing
3 changed files
with
16 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
local util = require("spec.util") | ||
|
||
describe("assignment to function", function() | ||
it("does not crash when using plain function definitions", util.check([[ | ||
local my_load: function(string, ? string, ? string, ? table): (function, string) | ||
local function run_file() | ||
local chunk: function(any):(any) | ||
chunk = my_load("") | ||
end | ||
]])) | ||
end) |
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