| Index: dart/site/try/poi/poi.dart
|
| diff --git a/dart/site/try/poi/poi.dart b/dart/site/try/poi/poi.dart
|
| index e5ca439346d288179be31e5c0ce86da664eef7ad..af038c0442c8ab6f2aa2aa988338ece64da61029 100644
|
| --- a/dart/site/try/poi/poi.dart
|
| +++ b/dart/site/try/poi/poi.dart
|
| @@ -44,9 +44,13 @@ import 'package:compiler/implementation/elements/elements.dart' show
|
| ClassElement,
|
| CompilationUnitElement,
|
| Element,
|
| + ElementCategory,
|
| LibraryElement,
|
| ScopeContainerElement;
|
|
|
| +import 'package:compiler/implementation/dart_types.dart' show
|
| + DartType;
|
| +
|
| import 'package:compiler/implementation/scanner/scannerlib.dart' show
|
| EOF_TOKEN,
|
| IDENTIFIER_TOKEN,
|
| @@ -367,6 +371,13 @@ class ScopeInformationVisitor extends ElementVisitor/* <void> */ {
|
| {bool omitEnclosing: true,
|
| void serializeMembers(),
|
| String name}) {
|
| + DartType type;
|
| + int category = element.kind.category;
|
| + if (category == ElementCategory.FUNCTION ||
|
| + category == ElementCategory.VARIABLE ||
|
| + element.isConstructor) {
|
| + type = element.computeType(cachedCompiler);
|
| + }
|
| if (name == null) {
|
| name = element.name;
|
| }
|
| @@ -380,7 +391,13 @@ class ScopeInformationVisitor extends ElementVisitor/* <void> */ {
|
| ..write('"kind": "')
|
| ..write(element.kind)
|
| ..write('"');
|
| - // TODO(ahe): Add a type/signature field.
|
| + if (type != null) {
|
| + buffer.write(',\n');
|
| + indented
|
| + ..write('"type": "')
|
| + ..write(type)
|
| + ..write('"');
|
| + }
|
| if (serializeMembers != null) {
|
| buffer.write(',\n');
|
| indented.write('"members": [');
|
|
|