-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed adding invalid as arg to empty callfunc invocations by default (
#1043) * Changed adding invalid as arg to empty callfunc invocations by default * Update src/BsConfig.ts Co-authored-by: Bronley Plumb <[email protected]> * Update bsconfig.schema.json Co-authored-by: Bronley Plumb <[email protected]> --------- Co-authored-by: Bronley Plumb <[email protected]>
- Loading branch information
1 parent
f2fefd3
commit 5e2c6ce
Showing
5 changed files
with
40 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2613,7 +2613,8 @@ describe('BrsFile', () => { | |
expectZeroDiagnostics(program); | ||
}); | ||
|
||
it('sets invalid on empty callfunc', async () => { | ||
it('sets invalid on empty callfunc with legacyCallfuncHandling=true', async () => { | ||
program.options.legacyCallfuncHandling = true; | ||
await testTranspile(` | ||
sub main() | ||
node = invalid | ||
|
@@ -2631,6 +2632,24 @@ describe('BrsFile', () => { | |
`); | ||
}); | ||
|
||
it('empty callfunc allowed by default', async () => { | ||
await testTranspile(` | ||
sub main() | ||
node = invalid | ||
[email protected]() | ||
[email protected]() | ||
[email protected](1) | ||
end sub | ||
`, ` | ||
sub main() | ||
node = invalid | ||
node.callfunc("doSomething") | ||
m.top.node.callfunc("doSomething") | ||
m.top.node.callfunc("doSomething", 1) | ||
end sub | ||
`); | ||
}); | ||
|
||
it('includes original arguments', async () => { | ||
await testTranspile(` | ||
sub main() | ||
|
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