Chromium Code Reviews| Index: dart/frog/leg/emitter.dart |
| diff --git a/dart/frog/leg/emitter.dart b/dart/frog/leg/emitter.dart |
| index 81539e589086aec983f996e329eec08d6ebd96c7..9e41c810dd87225a7d53218de8dd7d419e2155a2 100644 |
| --- a/dart/frog/leg/emitter.dart |
| +++ b/dart/frog/leg/emitter.dart |
| @@ -52,10 +52,9 @@ function(child, parent) { |
| String name = namer.getBailoutName(member); |
| buffer.add('$prototype.$name = $codeBlock;\n'); |
| } |
| - } else { |
| + } else if (member.kind === ElementKind.FIELD) { |
| // TODO(ngeoffray): Have another class generate the code for the |
| // fields. |
| - assert(member.kind === ElementKind.FIELD); |
| if (compiler.universe.invokedSetters.contains(member.name)) { |
| String setterName = namer.setterName(member.name); |
| buffer.add('$prototype.$setterName = function(v){\n' + |
| @@ -66,6 +65,9 @@ function(child, parent) { |
| buffer.add('$prototype.$getterName = function(){\n' + |
| ' return this.${namer.getName(member)};\n}\n'); |
| } |
| + } else { |
| + compiler.internalError('unexpected kind: "${member.kind}"', |
| + element: member); |
|
ngeoffray
2012/01/25 08:36:05
Because that's the only place it's needed, and bec
ahe
2012/01/25 08:56:24
I tried calling parseNode here, but noticed that I
ngeoffray
2012/01/25 09:03:59
Yeah, and I guess that's a bug: we're not putting
ahe
2012/01/25 09:07:14
I'm not sure what situation you have in mind here.
|
| } |
| } |