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

Side by Side Diff: lib/src/dart_sdk.dart

Issue 2278593004: Fix analyzer warning by updating _MockSdkSource. (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 code_transformers.src.dart_sdk; 5 library code_transformers.src.dart_sdk;
6 6
7 import 'dart:io' show Directory; 7 import 'dart:io' show Directory;
8 8
9 /// Note that the Analyzer has two versions of SdkAnalysisContext (and lots of 9 /// Note that the Analyzer has two versions of SdkAnalysisContext (and lots of
10 /// other classes) with different signatures: can't mix the two. 10 /// other classes) with different signatures: can't mix the two.
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 } 175 }
176 } 176 }
177 177
178 class _MockSdkSource implements UriAnnotatedSource { 178 class _MockSdkSource implements UriAnnotatedSource {
179 /// Absolute URI which this source can be imported from. 179 /// Absolute URI which this source can be imported from.
180 final Uri uri; 180 final Uri uri;
181 final String _contents; 181 final String _contents;
182 182
183 Source get source => this; 183 Source get source => this;
184 184
185 Source get librarySource => null;
186
185 _MockSdkSource(this.uri, this._contents); 187 _MockSdkSource(this.uri, this._contents);
186 188
187 bool exists() => true; 189 bool exists() => true;
188 190
189 int get hashCode => uri.hashCode; 191 int get hashCode => uri.hashCode;
190 192
191 final int modificationStamp = 1; 193 final int modificationStamp = 1;
192 194
193 TimestampedData<String> get contents => 195 TimestampedData<String> get contents =>
194 new TimestampedData(modificationStamp, _contents); 196 new TimestampedData(modificationStamp, _contents);
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 'dart:async': ''' 260 'dart:async': '''
259 class Future<T> { 261 class Future<T> {
260 Future then(callback) {} 262 Future then(callback) {}
261 class Stream<T> {} 263 class Stream<T> {}
262 ''', 264 ''',
263 'dart:html': ''' 265 'dart:html': '''
264 library dart.html; 266 library dart.html;
265 class HtmlElement {} 267 class HtmlElement {}
266 ''', 268 ''',
267 }; 269 };
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698