https://github.com/rexios80/dart2js_o0_mapper_exception
Minimal sample to reproduce an issue with closure usage in `dart_mappable` running in code compiled with `dart compile js -O0`
https://github.com/rexios80/dart2js_o0_mapper_exception
Last synced: 4 months ago
JSON representation
Minimal sample to reproduce an issue with closure usage in `dart_mappable` running in code compiled with `dart compile js -O0`
- Host: GitHub
- URL: https://github.com/rexios80/dart2js_o0_mapper_exception
- Owner: Rexios80
- Created: 2025-02-20T20:24:37.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-02-20T20:26:35.000Z (4 months ago)
- Last Synced: 2025-02-20T21:29:17.664Z (4 months ago)
- Language: Dart
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Minimal sample to reproduce an issue with closure usage in `dart_mappable` running in code compiled with `dart compile js -O0`
## Prerequisites
- Dart
- NodeJS## Broken
To see the code not working, run the following command:
```bash
dart run tool/run.dart O0
```You should see an exception similar to this:
```console
TypeError: J.getInterceptor$asx(...).get$isEmpty is not a function
at Object.get$isEmpty$asx (/Users/rexios/repos/dart2js_o0_mapper_exception/lib/index.js:682:45)
at PubPackageMapper.decode$2 (/Users/rexios/repos/dart2js_o0_mapper_exception/lib/index.js:26915:35)
at PubPackageMapper.decode$2 (/Users/rexios/repos/dart2js_o0_mapper_exception/lib/index.js:26691:19)
at PubPackageMapper.decoder$2 (/Users/rexios/repos/dart2js_o0_mapper_exception/lib/index.js:26905:22)
at PubPackageMapper.decoder$2 (/Users/rexios/repos/dart2js_o0_mapper_exception/lib/index.js:26675:22)
at PubPackageMapper.decodeValue$1$3 (/Users/rexios/repos/dart2js_o0_mapper_exception/lib/index.js:27211:26)
at PubPackageMapper.decodeValue$1$1 (/Users/rexios/repos/dart2js_o0_mapper_exception/lib/index.js:27220:19)
at PubPackageMapper.decodeMap$1$1 (/Users/rexios/repos/dart2js_o0_mapper_exception/lib/index.js:26935:19)
at Object.PubPackageMapper_fromMap (/Users/rexios/repos/dart2js_o0_mapper_exception/lib/index.js:10936:53)
at /Users/rexios/repos/dart2js_o0_mapper_exception/lib/index.js:29316:49
```## Working
To see the code working, run the following command:
```bash
dart run tool/run.dart O1
```You should not see any exceptions