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

Side by Side Diff: pkg/front_end/lib/src/fasta/messages.dart

Issue 2755983002: Implement override checks for methods. (Closed)
Patch Set: Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 fasta.messages; 5 library fasta.messages;
6 6
7 import 'package:kernel/ast.dart' show Location, Program; 7 import 'package:kernel/ast.dart' show Location, Program;
8 8
9 import 'util/relativize.dart' show relativizeUri; 9 import 'util/relativize.dart' show relativizeUri;
10 10
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 String path = relativizeUri(uri); 63 String path = relativizeUri(uri);
64 String position = 64 String position =
65 charOffset == -1 ? path : "${getLocation(path, charOffset)}"; 65 charOffset == -1 ? path : "${getLocation(path, charOffset)}";
66 return "$position: $message"; 66 return "$position: $message";
67 } else { 67 } else {
68 return message; 68 return message;
69 } 69 }
70 } 70 }
71 71
72 Location getLocation(String path, int charOffset) { 72 Location getLocation(String path, int charOffset) {
73 if (CompilerContext.current.uriToSource[path] == null) {
74 return new Location(path, 1, 1);
75 }
73 return new Program(null, CompilerContext.current.uriToSource) 76 return new Program(null, CompilerContext.current.uriToSource)
74 .getLocation(path, charOffset); 77 .getLocation(path, charOffset);
75 } 78 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698