Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(347)

Unified Diff: pkg/compiler/lib/src/resolution/enum_creator.dart

Issue 1942763002: Rebased and retested version of CL 1915123008. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/parser/node_listener.dart ('k') | pkg/compiler/lib/src/resolution/members.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/resolution/enum_creator.dart
diff --git a/pkg/compiler/lib/src/resolution/enum_creator.dart b/pkg/compiler/lib/src/resolution/enum_creator.dart
index cbdfc90189a85ffd4db36640f76fdfb87d4eb489..0dd861a530b0aa6b8c6796f1c377b9a554bb1655 100644
--- a/pkg/compiler/lib/src/resolution/enum_creator.dart
+++ b/pkg/compiler/lib/src/resolution/enum_creator.dart
@@ -82,11 +82,12 @@ class AstBuilder {
symbolToken(Precedence.SEMICOLON_INFO), expression);
}
- FunctionExpression functionExpression(
- Modifiers modifiers, String name, NodeList argumentList, Statement body,
+ FunctionExpression functionExpression(Modifiers modifiers, String name,
+ NodeList typeVariables, NodeList argumentList, Statement body,
[TypeAnnotation returnType]) {
return new FunctionExpression(
identifier(name),
+ typeVariables,
argumentList,
body,
returnType,
@@ -229,6 +230,7 @@ class EnumCreator {
FunctionExpression constructorNode = builder.functionExpression(
builder.modifiers(isConst: true),
enumClass.name,
+ null, // typeVariables
builder.argumentList([indexDefinition]),
builder.emptyStatement());
@@ -298,6 +300,7 @@ class EnumCreator {
FunctionExpression toStringNode = builder.functionExpression(
Modifiers.EMPTY,
'toString',
+ null, // typeVariables
builder.argumentList([]),
builder.returnStatement(builder.indexGet(
builder.mapLiteral(mapEntries, isConst: true),
« no previous file with comments | « pkg/compiler/lib/src/parser/node_listener.dart ('k') | pkg/compiler/lib/src/resolution/members.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698