-
-
Notifications
You must be signed in to change notification settings - Fork 666
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix null coal assign (with less code duplication) (#11980)
* Fix null coal assign * Can i extract this TBinop? * Nope, so there is more tests * start implementing the ??= stuff * turn into real errors so we know what's happening * adjust test for now * implement AKField * implement AKAccessor * implement AKUsingAccessor * implement AKResolve * try something * fix and adjust --------- Co-authored-by: RblSb <[email protected]>
- Loading branch information
Showing
6 changed files
with
367 additions
and
67 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
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,17 @@ | ||
package issues; | ||
|
||
class Issue11931 { | ||
@:js(' | ||
var arr = []; | ||
var tmp = arr[0]; | ||
issues_Issue11931.use(tmp == null ? arr[0] = [] : tmp); | ||
') | ||
static function test() { | ||
var arr = []; | ||
var e = arr[0] ??= []; | ||
use(e); | ||
} | ||
|
||
@:pure(false) | ||
static function use(v:Array<Int>) {} | ||
} |
Oops, something went wrong.