-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check whether type parameters are loaded before emitting.
This fixes #190. BUG= R=vsm@google.com Review URL: https://codereview.chromium.org/1143253003
- Loading branch information
1 parent
0ce4905
commit 406e68c
Showing
4 changed files
with
37 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
var functions = dart.defineLibrary(functions, {}); | ||
var core = dart.import(core); | ||
(function(exports, core) { | ||
'use strict'; | ||
function bootstrap() { | ||
return dart.setType([new Foo()], core.List$(Foo)); | ||
} | ||
dart.fn(bootstrap, () => dart.functionType(core.List$(Foo), [])); | ||
class Foo extends core.Object {} | ||
dart.setSignature(Foo, {}); | ||
function main() { | ||
core.print(bootstrap()[core.$get](0)); | ||
} | ||
dart.fn(main, dart.void, []); | ||
// Exports: | ||
exports.bootstrap = bootstrap; | ||
exports.Foo = Foo; | ||
exports.main = main; | ||
})(functions, core); |
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 @@ | ||
// Messages from compiling functions.dart |
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,14 @@ | ||
List<Foo> bootstrap() { | ||
return <Foo>[new Foo()]; | ||
} | ||
|
||
typedef B A2B<A, B>(A x); | ||
|
||
A2B<Foo, Foo> id(A2B<Foo, Foo> f) => f; | ||
|
||
class Foo { | ||
} | ||
|
||
void main() { | ||
print(bootstrap()[0]); | ||
} |