VM doesn't allow to access external globals from within the same library. #6997
Labels
area-vm
closed-cannot-reproduce
Closed as we were unable to reproduce the reported issue
closed-obsolete
Closed as the reported issue is no longer relevant
The VM doesn't allow to access external globals from within the same library. For example adding a port2 getter that just redirects to the external port getter will fail:
$ out/ReleaseIA32/dart bug.dart
Instance of '_ReceivePortImpl@0x2a486688'
Unhandled exception:
No such method: 'get:port', url 'dart:isolate' line 7 pos 30
external ReceivePort get port;
0 NoSuchMethodErrorImplementation._throwNew (dart:core-patch:633:3)
1 port (dart:isolate:7:30)
2 port2 (dart:isolate:8:26)
3 main (file:///tmp/t.dart:5:9)
===
diff --git a/sdk/lib/isolate/base.dart b/sdk/lib/isolate/base.dart
index e43e3bb..339aebb 100644
--- a/sdk/lib/isolate/base.dart
+++ b/sdk/lib/isolate/base.dart
@@ -15,6 +15,7 @@ class IsolateSpawnException implements Exception {
* [spawnUri]).
/
external ReceivePort get port;
+ReceivePort get port2 => port;
/**
Creates and spawns an isolate that shares the same code as the current
The text was updated successfully, but these errors were encountered: