Commit cc6d403
New functions - tests (#303)
* passing nil instead of _G as context for global functions when in ES strict mode
* fixed logic for determining strict mode
* replaced hack-around when passing nil as a function context with a null keyword
* testing viability of wrapping context/no-context calls on assignment
* working on more function assignment situations
* fixed getting constructor signature and refactored things a bit
* checking resolved signature when comparing function types passed as arguments
* working on assignment checks for methods vs functions
* handling context in calls and decls
* refactoring and handling tuple destructuring
* generalized tuple assignment checking
* overloads with function and method signatures default to functions now
* preventing non-methods from being passed to bind/call/apply
* removed uneccessary helpers
* using proper exceptions for function conversion errors
* removed context arg from custom constructors and added check for assigning to untyped vars
* updated tests
* removing leftover NoContext decorators
* recursing into interfaces during assignment validation
* fixes for issues with overloads using different context types
* less-lazy variable naming and improved error message
* suite of tests for new functions and fixes for edge-cases found1 parent 281ab54 commit cc6d403
File tree
4 files changed
+486
-12
lines changed- src
- test/unit
4 files changed
+486
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
75 | 77 | | |
76 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
77 | 81 | | |
78 | 82 | | |
79 | 83 | | |
80 | 84 | | |
81 | 85 | | |
82 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
83 | 89 | | |
84 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
85 | 93 | | |
86 | 94 | | |
87 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
259 | 284 | | |
260 | 285 | | |
261 | | - | |
262 | | - | |
263 | | - | |
| 286 | + | |
| 287 | + | |
264 | 288 | | |
265 | | - | |
| 289 | + | |
266 | 290 | | |
267 | 291 | | |
268 | 292 | | |
| |||
288 | 312 | | |
289 | 313 | | |
290 | 314 | | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
295 | 319 | | |
296 | 320 | | |
297 | 321 | | |
| |||
0 commit comments