Last active
December 19, 2015 22:58
-
-
Save kevmoo/6030995 to your computer and use it in GitHub Desktop.
Dart Bug: mixins with aliased imports Repo for https://code.google.com/p/dart/issues/detail?id=11891
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
library mixin_library; | |
import 'dart:json' as json; | |
class MixinClass { | |
String bar() => json.stringify({'a':1}); | |
} |
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
import 'mixin_class.dart'; | |
// Runtime error without this import | |
// import 'dart:json' as json; | |
class Oops extends Object with MixinClass { | |
String baz() => bar(); | |
} | |
void main() { | |
print("Hello, World!"); | |
var oops = new Oops(); | |
print(oops.baz()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fixed!
https://code.google.com/p/dart/source/detail?r=25233