bc4e0f2a38
Main goal here was to get rid of the enter/exit compilation unit tracking, to allow further Compiler/Server refactoring. We can get the Uri/LineInfo/contents off Source, which AnalysisError already has SummaryReporter is now fairly generic. TODOs for the future: * figure out what to do about ErrorCodes, in particular dev_compiler prefix feels off. * skip the intermediate StaticInfo types? They're really just builders now for AnalysisError. * don't classify all existing messages as "AnalyzerError" ... just print them ... * skip logger. For our command line program, stdout is part of its "API", IMO it shouldn't use logging for those messages. Consider Pub, which uses stdout/err for its messages, and uses logging for more detailed troubleshooting. R=pquitslund@google.com, vsm@google.com Review URL: https://codereview.chromium.org/1230903002.
24 lines
679 B
Dart
24 lines
679 B
Dart
// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
|
|
// 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.
|
|
|
|
class FormalCollision {
|
|
// These shouldn't collide (see issue #136)
|
|
int _x, __x;
|
|
// This shouldn't generate a keyword as an identifier.
|
|
Function _function;
|
|
FormalCollision(this._x, this.__x, this._function);
|
|
}
|
|
|
|
class OptionalArg {
|
|
int opt, _opt;
|
|
OptionalArg([this._opt = 123]);
|
|
OptionalArg.named({this.opt: 456});
|
|
}
|
|
|
|
main() {
|
|
print(new FormalCollision(1, 2, (x) => x));
|
|
print(new OptionalArg()._opt);
|
|
print(new OptionalArg.named()._opt);
|
|
}
|