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

Side by Side Diff: pkg/analyzer/lib/src/generated/constant.dart

Issue 674953002: Fix type of String.fromEnvironment() when the name is undefined. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/all_the_rest.dart » ('j') | 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 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library engine.constant; 8 library engine.constant;
9 9
10 import 'dart:collection'; 10 import 'dart:collection';
(...skipping 2407 matching lines...) Expand 10 before | Expand all | Expand 10 after
2418 * `null` if the variable is not defined. Return the value of the variable wit h the given 2418 * `null` if the variable is not defined. Return the value of the variable wit h the given
2419 * name interpreted as a String value. If the variable is not defined (or [var iableName] is 2419 * name interpreted as a String value. If the variable is not defined (or [var iableName] is
2420 * null), a DartObject representing "unknown" is returned. 2420 * null), a DartObject representing "unknown" is returned.
2421 * 2421 *
2422 * @param typeProvider the type provider used to find the type 'String' 2422 * @param typeProvider the type provider used to find the type 'String'
2423 * @param variableName the name of the variable whose value is to be returned 2423 * @param variableName the name of the variable whose value is to be returned
2424 */ 2424 */
2425 DartObject getString(TypeProvider typeProvider, String variableName) { 2425 DartObject getString(TypeProvider typeProvider, String variableName) {
2426 String value = _declaredVariables[variableName]; 2426 String value = _declaredVariables[variableName];
2427 if (value == null) { 2427 if (value == null) {
2428 return new DartObjectImpl(typeProvider.intType, IntState.UNKNOWN_VALUE); 2428 return new DartObjectImpl(typeProvider.stringType,
2429 StringState.UNKNOWN_VALUE);
2429 } 2430 }
2430 return new DartObjectImpl(typeProvider.stringType, new StringState(value)); 2431 return new DartObjectImpl(typeProvider.stringType, new StringState(value));
2431 } 2432 }
2432 } 2433 }
2433 2434
2434 /** 2435 /**
2435 * Instances of the class `DoubleState` represent the state of an object represe nting a 2436 * Instances of the class `DoubleState` represent the state of an object represe nting a
2436 * double. 2437 * double.
2437 */ 2438 */
2438 class DoubleState extends NumState { 2439 class DoubleState extends NumState {
(...skipping 2248 matching lines...) Expand 10 before | Expand all | Expand 10 after
4687 4688
4688 @override 4689 @override
4689 String get typeName => "Type"; 4690 String get typeName => "Type";
4690 4691
4691 @override 4692 @override
4692 int get hashCode => _element == null ? 0 : _element.hashCode; 4693 int get hashCode => _element == null ? 0 : _element.hashCode;
4693 4694
4694 @override 4695 @override
4695 String toString() => _element == null ? "-unknown-" : _element.name; 4696 String toString() => _element == null ? "-unknown-" : _element.name;
4696 } 4697 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/all_the_rest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698