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

Side by Side Diff: tests/compiler/dart2js/memory_compiler.dart

Issue 1423623008: Improve messages and static use for super/this-calls. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comment. Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library dart2js.test.memory_compiler; 5 library dart2js.test.memory_compiler;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:compiler/compiler.dart' show 9 import 'package:compiler/compiler.dart' show
10 DiagnosticHandler; 10 DiagnosticHandler;
(...skipping 22 matching lines...) Expand all
33 final Message message; 33 final Message message;
34 final Uri uri; 34 final Uri uri;
35 final int begin; 35 final int begin;
36 final int end; 36 final int end;
37 final String text; 37 final String text;
38 final Diagnostic kind; 38 final Diagnostic kind;
39 39
40 DiagnosticMessage( 40 DiagnosticMessage(
41 this.message, this.uri, this.begin, this.end, this.text, this.kind); 41 this.message, this.uri, this.begin, this.end, this.text, this.kind);
42 42
43 String toString() => '$uri:$begin:$end:$text:$kind'; 43 String toString() => '${message.kind}:$uri:$begin:$end:$text:$kind';
44 } 44 }
45 45
46 class DiagnosticCollector implements CompilerDiagnostics { 46 class DiagnosticCollector implements CompilerDiagnostics {
47 List<DiagnosticMessage> messages = <DiagnosticMessage>[]; 47 List<DiagnosticMessage> messages = <DiagnosticMessage>[];
48 48
49 void call(Uri uri, int begin, int end, String message, Diagnostic kind) { 49 void call(Uri uri, int begin, int end, String message, Diagnostic kind) {
50 report(null, uri, begin, end, message, kind); 50 report(null, uri, begin, end, message, kind);
51 } 51 }
52 52
53 @override 53 @override
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 createDiagnosticHandler(diagnosticHandler, provider, showDiagnostics); 330 createDiagnosticHandler(diagnosticHandler, provider, showDiagnostics);
331 331
332 List<Uri> libraries = <Uri>[]; 332 List<Uri> libraries = <Uri>[];
333 memorySourceFiles.forEach((String path, _) { 333 memorySourceFiles.forEach((String path, _) {
334 libraries.add(new Uri(scheme: 'memory', path: path)); 334 libraries.add(new Uri(scheme: 'memory', path: path));
335 }); 335 });
336 336
337 return analyze(libraries, libraryRoot, packageRoot, 337 return analyze(libraries, libraryRoot, packageRoot,
338 provider, handler, options); 338 provider, handler, options);
339 } 339 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/diagnose_ambiguous_test.dart ('k') | tests/compiler/dart2js/message_kind_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698