A single result from a search request.
diff --git a/pkg/analysis_server_client/lib/src/protocol/protocol_constants.dart b/pkg/analysis_server_client/lib/src/protocol/protocol_constants.dart
index 9d85d08bdd2eb..1280460f470c7 100644
--- a/pkg/analysis_server_client/lib/src/protocol/protocol_constants.dart
+++ b/pkg/analysis_server_client/lib/src/protocol/protocol_constants.dart
@@ -173,11 +173,10 @@ const String EDIT_REQUEST_ORGANIZE_DIRECTIVES = 'edit.organizeDirectives';
const String EDIT_REQUEST_ORGANIZE_DIRECTIVES_FILE = 'file';
const String EDIT_REQUEST_SORT_MEMBERS = 'edit.sortMembers';
const String EDIT_REQUEST_SORT_MEMBERS_FILE = 'file';
-const String EDIT_RESPONSE_DARTFIX_DESCRIPTION_OF_FIXES = 'descriptionOfFixes';
-const String EDIT_RESPONSE_DARTFIX_FIXES = 'fixes';
+const String EDIT_RESPONSE_DARTFIX_EDITS = 'edits';
const String EDIT_RESPONSE_DARTFIX_HAS_ERRORS = 'hasErrors';
-const String EDIT_RESPONSE_DARTFIX_OTHER_RECOMMENDATIONS =
- 'otherRecommendations';
+const String EDIT_RESPONSE_DARTFIX_OTHER_SUGGESTIONS = 'otherSuggestions';
+const String EDIT_RESPONSE_DARTFIX_SUGGESTIONS = 'suggestions';
const String EDIT_RESPONSE_FORMAT_EDITS = 'edits';
const String EDIT_RESPONSE_FORMAT_SELECTION_LENGTH = 'selectionLength';
const String EDIT_RESPONSE_FORMAT_SELECTION_OFFSET = 'selectionOffset';
diff --git a/pkg/analysis_server_client/lib/src/protocol/protocol_generated.dart b/pkg/analysis_server_client/lib/src/protocol/protocol_generated.dart
index 2bbf169d20865..9fabb4c83ad2b 100644
--- a/pkg/analysis_server_client/lib/src/protocol/protocol_generated.dart
+++ b/pkg/analysis_server_client/lib/src/protocol/protocol_generated.dart
@@ -5931,6 +5931,105 @@ class ConvertMethodToGetterOptions extends RefactoringOptions
}
}
+/**
+ * DartFixSuggestion
+ *
+ * {
+ * "description": String
+ * "location": optional Location
+ * }
+ *
+ * Clients may not extend, implement or mix-in this class.
+ */
+class DartFixSuggestion implements HasToJson {
+ String _description;
+
+ Location _location;
+
+ /**
+ * A human readable description of the suggested change.
+ */
+ String get description => _description;
+
+ /**
+ * A human readable description of the suggested change.
+ */
+ void set description(String value) {
+ assert(value != null);
+ this._description = value;
+ }
+
+ /**
+ * The location of the suggested change.
+ */
+ Location get location => _location;
+
+ /**
+ * The location of the suggested change.
+ */
+ void set location(Location value) {
+ this._location = value;
+ }
+
+ DartFixSuggestion(String description, {Location location}) {
+ this.description = description;
+ this.location = location;
+ }
+
+ factory DartFixSuggestion.fromJson(
+ JsonDecoder jsonDecoder, String jsonPath, Object json) {
+ if (json == null) {
+ json = {};
+ }
+ if (json is Map) {
+ String description;
+ if (json.containsKey("description")) {
+ description = jsonDecoder.decodeString(
+ jsonPath + ".description", json["description"]);
+ } else {
+ throw jsonDecoder.mismatch(jsonPath, "description");
+ }
+ Location location;
+ if (json.containsKey("location")) {
+ location = new Location.fromJson(
+ jsonDecoder, jsonPath + ".location", json["location"]);
+ }
+ return new DartFixSuggestion(description, location: location);
+ } else {
+ throw jsonDecoder.mismatch(jsonPath, "DartFixSuggestion", json);
+ }
+ }
+
+ @override
+ Map toJson() {
+ Map result = {};
+ result["description"] = description;
+ if (location != null) {
+ result["location"] = location.toJson();
+ }
+ return result;
+ }
+
+ @override
+ String toString() => json.encode(toJson());
+
+ @override
+ bool operator ==(other) {
+ if (other is DartFixSuggestion) {
+ return description == other.description && location == other.location;
+ }
+ return false;
+ }
+
+ @override
+ int get hashCode {
+ int hash = 0;
+ hash = JenkinsSmiHash.combine(hash, description.hashCode);
+ hash = JenkinsSmiHash.combine(hash, location.hashCode);
+ return JenkinsSmiHash.finish(hash);
+ }
+}
+
/**
* diagnostic.getDiagnostics params
*
@@ -6268,60 +6367,60 @@ class EditDartfixParams implements RequestParams {
* edit.dartfix result
*
* {
- * "descriptionOfFixes": List
- * "otherRecommendations": List
+ * "suggestions": List
+ * "otherSuggestions": List
* "hasErrors": bool
- * "fixes": List
+ * "edits": List
* }
*
* Clients may not extend, implement or mix-in this class.
*/
class EditDartfixResult implements ResponseResult {
- List _descriptionOfFixes;
+ List _suggestions;
- List _otherRecommendations;
+ List _otherSuggestions;
bool _hasErrors;
- List _fixes;
+ List _edits;
/**
- * A list of human readable changes made by applying the fixes.
+ * A list of recommended changes that can be automatically made by applying
+ * the 'edits' included in this response.
*/
- List get descriptionOfFixes => _descriptionOfFixes;
+ List get suggestions => _suggestions;
/**
- * A list of human readable changes made by applying the fixes.
+ * A list of recommended changes that can be automatically made by applying
+ * the 'edits' included in this response.
*/
- void set descriptionOfFixes(List value) {
+ void set suggestions(List value) {
assert(value != null);
- this._descriptionOfFixes = value;
+ this._suggestions = value;
}
/**
- * A list of human readable recommended changes that cannot be made
- * automatically.
+ * A list of recommended changes that could not be automatically made.
*/
- List get otherRecommendations => _otherRecommendations;
+ List get otherSuggestions => _otherSuggestions;
/**
- * A list of human readable recommended changes that cannot be made
- * automatically.
+ * A list of recommended changes that could not be automatically made.
*/
- void set otherRecommendations(List value) {
+ void set otherSuggestions(List value) {
assert(value != null);
- this._otherRecommendations = value;
+ this._otherSuggestions = value;
}
/**
* True if the analyzed source contains errors that might impact the
- * correctness of the recommended fixes that can be automatically applied.
+ * correctness of the recommended changes that can be automatically applied.
*/
bool get hasErrors => _hasErrors;
/**
* True if the analyzed source contains errors that might impact the
- * correctness of the recommended fixes that can be automatically applied.
+ * correctness of the recommended changes that can be automatically applied.
*/
void set hasErrors(bool value) {
assert(value != null);
@@ -6329,27 +6428,27 @@ class EditDartfixResult implements ResponseResult {
}
/**
- * The suggested fixes.
+ * A list of source edits to apply the recommended changes.
*/
- List get fixes => _fixes;
+ List get edits => _edits;
/**
- * The suggested fixes.
+ * A list of source edits to apply the recommended changes.
*/
- void set fixes(List value) {
+ void set edits(List value) {
assert(value != null);
- this._fixes = value;
+ this._edits = value;
}
EditDartfixResult(
- List descriptionOfFixes,
- List otherRecommendations,
+ List suggestions,
+ List otherSuggestions,
bool hasErrors,
- List fixes) {
- this.descriptionOfFixes = descriptionOfFixes;
- this.otherRecommendations = otherRecommendations;
+ List edits) {
+ this.suggestions = suggestions;
+ this.otherSuggestions = otherSuggestions;
this.hasErrors = hasErrors;
- this.fixes = fixes;
+ this.edits = edits;
}
factory EditDartfixResult.fromJson(
@@ -6358,23 +6457,25 @@ class EditDartfixResult implements ResponseResult {
json = {};
}
if (json is Map) {
- List descriptionOfFixes;
- if (json.containsKey("descriptionOfFixes")) {
- descriptionOfFixes = jsonDecoder.decodeList(
- jsonPath + ".descriptionOfFixes",
- json["descriptionOfFixes"],
- jsonDecoder.decodeString);
+ List suggestions;
+ if (json.containsKey("suggestions")) {
+ suggestions = jsonDecoder.decodeList(
+ jsonPath + ".suggestions",
+ json["suggestions"],
+ (String jsonPath, Object json) =>
+ new DartFixSuggestion.fromJson(jsonDecoder, jsonPath, json));
} else {
- throw jsonDecoder.mismatch(jsonPath, "descriptionOfFixes");
+ throw jsonDecoder.mismatch(jsonPath, "suggestions");
}
- List otherRecommendations;
- if (json.containsKey("otherRecommendations")) {
- otherRecommendations = jsonDecoder.decodeList(
- jsonPath + ".otherRecommendations",
- json["otherRecommendations"],
- jsonDecoder.decodeString);
+ List otherSuggestions;
+ if (json.containsKey("otherSuggestions")) {
+ otherSuggestions = jsonDecoder.decodeList(
+ jsonPath + ".otherSuggestions",
+ json["otherSuggestions"],
+ (String jsonPath, Object json) =>
+ new DartFixSuggestion.fromJson(jsonDecoder, jsonPath, json));
} else {
- throw jsonDecoder.mismatch(jsonPath, "otherRecommendations");
+ throw jsonDecoder.mismatch(jsonPath, "otherSuggestions");
}
bool hasErrors;
if (json.containsKey("hasErrors")) {
@@ -6383,18 +6484,18 @@ class EditDartfixResult implements ResponseResult {
} else {
throw jsonDecoder.mismatch(jsonPath, "hasErrors");
}
- List fixes;
- if (json.containsKey("fixes")) {
- fixes = jsonDecoder.decodeList(
- jsonPath + ".fixes",
- json["fixes"],
+ List edits;
+ if (json.containsKey("edits")) {
+ edits = jsonDecoder.decodeList(
+ jsonPath + ".edits",
+ json["edits"],
(String jsonPath, Object json) =>
new SourceFileEdit.fromJson(jsonDecoder, jsonPath, json));
} else {
- throw jsonDecoder.mismatch(jsonPath, "fixes");
+ throw jsonDecoder.mismatch(jsonPath, "edits");
}
return new EditDartfixResult(
- descriptionOfFixes, otherRecommendations, hasErrors, fixes);
+ suggestions, otherSuggestions, hasErrors, edits);
} else {
throw jsonDecoder.mismatch(jsonPath, "edit.dartfix result", json);
}
@@ -6410,11 +6511,14 @@ class EditDartfixResult implements ResponseResult {
@override
Map toJson() {
Map result = {};
- result["descriptionOfFixes"] = descriptionOfFixes;
- result["otherRecommendations"] = otherRecommendations;
+ result["suggestions"] =
+ suggestions.map((DartFixSuggestion value) => value.toJson()).toList();
+ result["otherSuggestions"] = otherSuggestions
+ .map((DartFixSuggestion value) => value.toJson())
+ .toList();
result["hasErrors"] = hasErrors;
- result["fixes"] =
- fixes.map((SourceFileEdit value) => value.toJson()).toList();
+ result["edits"] =
+ edits.map((SourceFileEdit value) => value.toJson()).toList();
return result;
}
@@ -6429,12 +6533,12 @@ class EditDartfixResult implements ResponseResult {
@override
bool operator ==(other) {
if (other is EditDartfixResult) {
- return listEqual(descriptionOfFixes, other.descriptionOfFixes,
- (String a, String b) => a == b) &&
- listEqual(otherRecommendations, other.otherRecommendations,
- (String a, String b) => a == b) &&
+ return listEqual(suggestions, other.suggestions,
+ (DartFixSuggestion a, DartFixSuggestion b) => a == b) &&
+ listEqual(otherSuggestions, other.otherSuggestions,
+ (DartFixSuggestion a, DartFixSuggestion b) => a == b) &&
hasErrors == other.hasErrors &&
- listEqual(fixes, other.fixes,
+ listEqual(edits, other.edits,
(SourceFileEdit a, SourceFileEdit b) => a == b);
}
return false;
@@ -6443,10 +6547,10 @@ class EditDartfixResult implements ResponseResult {
@override
int get hashCode {
int hash = 0;
- hash = JenkinsSmiHash.combine(hash, descriptionOfFixes.hashCode);
- hash = JenkinsSmiHash.combine(hash, otherRecommendations.hashCode);
+ hash = JenkinsSmiHash.combine(hash, suggestions.hashCode);
+ hash = JenkinsSmiHash.combine(hash, otherSuggestions.hashCode);
hash = JenkinsSmiHash.combine(hash, hasErrors.hashCode);
- hash = JenkinsSmiHash.combine(hash, fixes.hashCode);
+ hash = JenkinsSmiHash.combine(hash, edits.hashCode);
return JenkinsSmiHash.finish(hash);
}
}
diff --git a/pkg/dartfix/lib/src/driver.dart b/pkg/dartfix/lib/src/driver.dart
index 80b6c11d10599..80e7a05ac497f 100644
--- a/pkg/dartfix/lib/src/driver.dart
+++ b/pkg/dartfix/lib/src/driver.dart
@@ -122,25 +122,23 @@ class Driver {
}
Future applyFixes(EditDartfixResult result) async {
- showDescriptions('Recommended changes', result.descriptionOfFixes);
- showDescriptions(
- 'Recommended changes that cannot not be automatically applied',
- result.otherRecommendations,
- );
- if (result.descriptionOfFixes.isEmpty) {
+ showDescriptions('Recommended changes', result.suggestions);
+ showDescriptions('Recommended changes that cannot be automatically applied',
+ result.otherSuggestions);
+ if (result.suggestions.isEmpty) {
logger.stdout('');
- logger.stdout(result.otherRecommendations.isNotEmpty
- ? 'No recommended changes that cannot be automatically applied.'
+ logger.stdout(result.otherSuggestions.isNotEmpty
+ ? 'None of the recommended changes can be automatically applied.'
: 'No recommended changes.');
return;
}
logger.stdout('');
logger.stdout(ansi.emphasized('Files to be changed:'));
- for (SourceFileEdit fileEdit in result.fixes) {
+ for (SourceFileEdit fileEdit in result.edits) {
logger.stdout(' ${_relativePath(fileEdit.file)}');
}
if (shouldApplyChanges(result)) {
- for (SourceFileEdit fileEdit in result.fixes) {
+ for (SourceFileEdit fileEdit in result.edits) {
final file = new File(fileEdit.file);
String code = await file.readAsString();
for (SourceEdit edit in fileEdit.edits) {
@@ -152,13 +150,16 @@ class Driver {
}
}
- void showDescriptions(String title, List descriptions) {
- if (descriptions.isNotEmpty) {
+ void showDescriptions(String title, List suggestions) {
+ if (suggestions.isNotEmpty) {
logger.stdout('');
logger.stdout(ansi.emphasized('$title:'));
- List sorted = new List.from(descriptions)..sort();
- for (String line in sorted) {
- logger.stdout(' $line');
+ List sorted = new List.from(suggestions)
+ ..sort(compareSuggestions);
+ for (DartFixSuggestion suggestion in sorted) {
+ Location loc = suggestion.location;
+ logger.stdout(' ${_toSentenceFragment(suggestion.description)}'
+ '${loc == null ? "" : " • ${loc.startLine}:${loc.startColumn}"}');
}
}
}
@@ -327,6 +328,14 @@ class Driver {
}
}
+ int compareSuggestions(DartFixSuggestion s1, DartFixSuggestion s2) {
+ int result = s1.description.compareTo(s2.description);
+ if (result != 0) {
+ return result;
+ }
+ return (s2.location?.offset ?? 0) - (s1.location?.offset ?? 0);
+ }
+
bool shouldFilterError(AnalysisError error) {
// Do not show TODOs or errors that will be automatically fixed.
diff --git a/pkg/dev_compiler/lib/src/analyzer/property_model.dart b/pkg/dev_compiler/lib/src/analyzer/property_model.dart
index 1691857c6970f..b7dc784607fbb 100644
--- a/pkg/dev_compiler/lib/src/analyzer/property_model.dart
+++ b/pkg/dev_compiler/lib/src/analyzer/property_model.dart
@@ -58,22 +58,27 @@ class _LibraryVirtualFieldModel {
final _extensiblePrivateClasses = HashSet();
_LibraryVirtualFieldModel.build(LibraryElement library) {
- var allTypes = library.units.expand((u) => u.types).toList();
+ var allClasses = Set();
+ for (var libraryPart in library.units) {
+ allClasses.addAll(libraryPart.types);
+ allClasses.addAll(libraryPart.mixins);
+ }
// The set of public types is our initial extensible type set.
// From there, visit all immediate private types in this library, and so on
// from those private types, marking them as extensible.
- var typesToVisit =
- Queue.from(allTypes.where((t) => t.isPublic));
- while (typesToVisit.isNotEmpty) {
- var extensibleType = typesToVisit.removeFirst();
+ var classesToVisit =
+ Queue.from(allClasses.where((t) => t.isPublic));
+ while (classesToVisit.isNotEmpty) {
+ var extensibleClass = classesToVisit.removeFirst();
// For each supertype of a public type in this library,
// if we encounter a private class, we mark it as being extended, and
// add it to our work set if this is the first time we've visited it.
- for (var type in getImmediateSuperclasses(extensibleType)) {
- if (!type.isPublic && type.library == library) {
- if (_extensiblePrivateClasses.add(type)) typesToVisit.add(type);
+ for (var superclass in getImmediateSuperclasses(extensibleClass)) {
+ if (!superclass.isPublic && superclass.library == library) {
+ if (_extensiblePrivateClasses.add(superclass))
+ classesToVisit.add(superclass);
}
}
}
@@ -88,43 +93,44 @@ class _LibraryVirtualFieldModel {
}
var allFields =
- HashMap.fromIterables(allTypes, allTypes.map(getInstanceFieldMap));
+ HashMap.fromIterables(allClasses, allClasses.map(getInstanceFieldMap));
- for (var type in allTypes) {
- Set supertypes = null;
+ for (var class_ in allClasses) {
+ Set superclasses;
// Visit accessors in the current class, and see if they override an
// otherwise private field.
- for (var accessor in type.accessors) {
+ for (var accessor in class_.accessors) {
// For getter/setter pairs only process them once.
if (accessor.correspondingGetter != null) continue;
// Ignore abstract or static accessors.
if (accessor.isAbstract || accessor.isStatic) continue;
// Ignore public accessors in extensible classes.
if (accessor.isPublic &&
- (type.isPublic || _extensiblePrivateClasses.contains(type))) {
+ (class_.isPublic || _extensiblePrivateClasses.contains(class_))) {
continue;
}
- if (supertypes == null) {
- supertypes = Set();
- void collectSupertypes(ClassElement cls) {
- if (!supertypes.add(cls)) return;
+ if (superclasses == null) {
+ superclasses = Set();
+ void collectSuperclasses(ClassElement cls) {
+ if (!superclasses.add(cls)) return;
var s = cls.supertype?.element;
- if (s != null) collectSupertypes(s);
- cls.mixins.forEach((m) => collectSupertypes(m.element));
+ if (s != null) collectSuperclasses(s);
+ cls.mixins.forEach((m) => collectSuperclasses(m.element));
}
- collectSupertypes(type);
- supertypes.remove(type);
- supertypes.removeWhere((c) => c.library != type.library);
+ collectSuperclasses(class_);
+ superclasses.remove(class_);
+ superclasses.removeWhere((c) => c.library != library);
}
// Look in all super classes to see if we're overriding a field in our
// library, if so mark that field as overridden.
var name = accessor.variable.name;
- _overriddenPrivateFields.addAll(
- supertypes.map((c) => allFields[c][name]).where((f) => f != null));
+ _overriddenPrivateFields.addAll(superclasses
+ .map((c) => allFields[c][name])
+ .where((f) => f != null));
}
}
}
diff --git a/pkg/dev_compiler/lib/src/kernel/analyzer_to_kernel.dart b/pkg/dev_compiler/lib/src/kernel/analyzer_to_kernel.dart
index e004f89bb6e8d..0921e357c3bc6 100644
--- a/pkg/dev_compiler/lib/src/kernel/analyzer_to_kernel.dart
+++ b/pkg/dev_compiler/lib/src/kernel/analyzer_to_kernel.dart
@@ -186,6 +186,7 @@ class AnalyzerToKernel {
library ??= visitLibraryElement(e.library);
library.addClass(class_);
+ class_.isMixinDeclaration = e.isMixin;
class_.typeParameters
.addAll(e.typeParameters.map(visitTypeParameterElement));
@@ -504,6 +505,9 @@ class AnalyzerToKernel {
for (var t in u.types) {
visitClassElement(t, library);
}
+ for (var t in u.mixins) {
+ visitClassElement(t, library);
+ }
for (var t in u.functionTypeAliases) {
visitFunctionTypeAliasElement(t, library);
}
diff --git a/pkg/dev_compiler/lib/src/kernel/property_model.dart b/pkg/dev_compiler/lib/src/kernel/property_model.dart
index 4242554bf65d2..df0444bc16591 100644
--- a/pkg/dev_compiler/lib/src/kernel/property_model.dart
+++ b/pkg/dev_compiler/lib/src/kernel/property_model.dart
@@ -92,7 +92,7 @@ class _LibraryVirtualFieldModel {
HashMap.fromIterables(allClasses, allClasses.map(getInstanceFieldMap));
for (var class_ in allClasses) {
- Set superclasses = null;
+ Set superclasses;
// Visit accessors in the current class, and see if they override an
// otherwise private field.
@@ -124,8 +124,7 @@ class _LibraryVirtualFieldModel {
collectSupertypes(class_);
superclasses.remove(class_);
- superclasses.removeWhere(
- (s) => s.enclosingLibrary != class_.enclosingLibrary);
+ superclasses.removeWhere((s) => s.enclosingLibrary != library);
}
// Look in all super classes to see if we're overriding a field in our
diff --git a/runtime/vm/source_report.cc b/runtime/vm/source_report.cc
index 50b44d987b8f3..0bcef136d7fd4 100644
--- a/runtime/vm/source_report.cc
+++ b/runtime/vm/source_report.cc
@@ -112,15 +112,18 @@ bool SourceReport::ShouldSkipFunction(const Function& func) {
}
intptr_t SourceReport::GetScriptIndex(const Script& script) {
+ ScriptTableEntry wrapper;
const String& url = String::Handle(zone(), script.url());
- ScriptTableEntry* pair = script_table_.LookupValue(&url);
+ wrapper.key = &url;
+ wrapper.script = &Script::Handle(zone(), script.raw());
+ ScriptTableEntry* pair = script_table_.LookupValue(&wrapper);
if (pair != NULL) {
return pair->index;
}
ScriptTableEntry* tmp = new ScriptTableEntry();
tmp->key = &url;
tmp->index = next_script_index_++;
- tmp->script = &Script::Handle(zone(), script.raw());
+ tmp->script = wrapper.script;
script_table_entries_.Add(tmp);
script_table_.Insert(tmp);
ASSERT(script_table_entries_.length() == next_script_index_);
@@ -139,7 +142,10 @@ void SourceReport::VerifyScriptTable() {
ASSERT(i == index);
const String& url2 = String::Handle(zone(), script->url());
ASSERT(url2.Equals(*url));
- ScriptTableEntry* pair = script_table_.LookupValue(&url2);
+ ScriptTableEntry wrapper;
+ wrapper.key = &url2;
+ wrapper.script = &Script::Handle(zone(), script->raw());
+ ScriptTableEntry* pair = script_table_.LookupValue(&wrapper);
ASSERT(i == pair->index);
}
}
diff --git a/runtime/vm/source_report.h b/runtime/vm/source_report.h
index 8db241894cb06..5ab147f021200 100644
--- a/runtime/vm/source_report.h
+++ b/runtime/vm/source_report.h
@@ -94,17 +94,17 @@ class SourceReport {
// Needed for DirectChainedHashMap.
struct ScriptTableTrait {
typedef ScriptTableEntry* Value;
- typedef const String* Key;
+ typedef const ScriptTableEntry* Key;
typedef ScriptTableEntry* Pair;
- static Key KeyOf(Pair kv) { return kv->key; }
+ static Key KeyOf(Pair kv) { return kv; }
static Value ValueOf(Pair kv) { return kv; }
- static inline intptr_t Hashcode(Key key) { return key->Hash(); }
+ static inline intptr_t Hashcode(Key key) { return key->key->Hash(); }
static inline bool IsKeyEqual(Pair kv, Key key) {
- return kv->key->Equals(*key);
+ return kv->script->raw() == key->script->raw();
}
};
diff --git a/tests/language_2/mixin_declaration/mixin_declaration_syntax_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_syntax_test.dart
index 9bfc38f8d6491..aba464029ac69 100644
--- a/tests/language_2/mixin_declaration/mixin_declaration_syntax_test.dart
+++ b/tests/language_2/mixin_declaration/mixin_declaration_syntax_test.dart
@@ -402,4 +402,19 @@ void main() {
}
Expect.equals(CeOwithM().toString(), CwithM().toString());
+
+ {
+ // Regression test for private fields.
+ var c = PrivateFieldClass();
+ Expect.equals(42, c._foo);
+ }
+}
+
+
+mixin PrivateFieldMixin {
+ int _foo = 40;
+}
+
+class PrivateFieldClass with PrivateFieldMixin {
+ int get _foo => super._foo + 2;
}
diff --git a/tools/VERSION b/tools/VERSION
index 804d4a7c04c84..4f5aa1c61074b 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -28,4 +28,4 @@ MAJOR 2
MINOR 1
PATCH 0
PRERELEASE 9
-PRERELEASE_PATCH 0
+PRERELEASE_PATCH 1
diff --git a/tools/gn.py b/tools/gn.py
index 50740efed5ea7..9b348628b88a4 100755
--- a/tools/gn.py
+++ b/tools/gn.py
@@ -248,7 +248,7 @@ def ToGnArgs(args, mode, arch, target_os):
# Setup the user-defined sysroot.
if UseSysroot(args, gn_args):
- gn_args['dart_use_wheezy_sysroot'] = True
+ gn_args['dart_use_debian_sysroot'] = True
else:
sysroot = TargetSysroot(args)
if sysroot:
diff --git a/tools/set_ia32_sysroot.sh b/tools/set_ia32_sysroot.sh
index c7156cea27b25..194433040640d 100755
--- a/tools/set_ia32_sysroot.sh
+++ b/tools/set_ia32_sysroot.sh
@@ -4,16 +4,16 @@
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
-# Sets the compiler environment variables to use a downloaded wheezy sysroot
+# Sets the compiler environment variables to use a downloaded Debian sysroot
# when building Dart with architecture ia32.
-# Run this in the same working directory that you have run
+# Run this in the same working directory that you have run
# sdk/tools/download_chromium_sysroot.sh in.
# Must be sourced, not run in a subshell, to modify the environment.
# Run with the command ". sdk/tools/set_ia32_sysroot.sh"
# Only tested and used on Ubuntu trusty linux. Used to build dart with
# no requirement for glibc greater than version 2.14.
-export CXXFLAGS="--sysroot=$PWD/build/linux/debian_wheezy_i386-sysroot -I=/usr/include/c++/4.6 -I=/usr/include/c++/4.6/i486-linux-gnu"
+export CXXFLAGS="--sysroot=$PWD/build/linux/debian_jessie_i386-sysroot -I=/usr/include/c++/4.8 -I=/usr/include/c++/4.8/i486-linux-gnu"
-export LDFLAGS=--sysroot=$PWD/build/linux/debian_wheezy_i386-sysroot
-export CFLAGS=--sysroot=$PWD/build/linux/debian_wheezy_i386-sysroot
+export LDFLAGS=--sysroot=$PWD/build/linux/debian_jessie_i386-sysroot
+export CFLAGS=--sysroot=$PWD/build/linux/debian_jessie_i386-sysroot
diff --git a/tools/set_x64_sysroot.sh b/tools/set_x64_sysroot.sh
index bc28961ce609c..9c199ffd3b2cd 100755
--- a/tools/set_x64_sysroot.sh
+++ b/tools/set_x64_sysroot.sh
@@ -4,16 +4,16 @@
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
-# Sets the compiler environment variables to use a downloaded wheezy sysroot
+# Sets the compiler environment variables to use a downloaded Debian sysroot
# when building Dart with architecture x64.
-# Run this in the same working directory that you have run
+# Run this in the same working directory that you have run
# sdk/tools/download_chromium_sysroot.sh in.
# Must be sourced, not run in a subshell, to modify the environment.
# Run with the command ". sdk/tools/set_x64_sysroot.sh"
# Only tested and used on Ubuntu trusty linux. Used to build dart with
# no requirement for glibc greater than version 2.14.
-export CXXFLAGS="--sysroot=$PWD/build/linux/debian_wheezy_amd64-sysroot -I=/usr/include/c++/4.6 -I=/usr/include/c++/4.6/x86_64-linux-gnu"
+export CXXFLAGS="--sysroot=$PWD/build/linux/debian_jessie_amd64-sysroot -I=/usr/include/c++/4.8 -I=/usr/include/c++/4.8/x86_64-linux-gnu"
-export LDFLAGS=--sysroot=$PWD/build/linux/debian_wheezy_amd64-sysroot
-export CFLAGS=--sysroot=$PWD/build/linux/debian_wheezy_amd64-sysroot
+export LDFLAGS=--sysroot=$PWD/build/linux/debian_jessie_amd64-sysroot
+export CFLAGS=--sysroot=$PWD/build/linux/debian_jessie_amd64-sysroot