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

Issue 10735030: dart2dart fix synthesized constructor appearing in unparser. Don't output it. (Closed)

Created:
8 years, 5 months ago by Roman
Modified:
8 years, 5 months ago
Reviewers:
Anton Muhin
CC:
reviews_dartlang.org
Visibility:
Public.

Description

dart2dart fix synthesized constructor appearing in unparser. Don't output it. For example, if we have: class A { } main() { new A(); } that would result in: class A{class}... that "class" is the unparse result of synthesized constructor. Committed: https://code.google.com/p/dart/source/detail?r=9541

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -5 lines) Patch
M lib/compiler/implementation/dart_backend/backend.dart View 1 chunk +1 line, -0 lines 0 comments Download
M tests/compiler/dart2js/unparser_test.dart View 1 5 chunks +17 lines, -5 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Roman
8 years, 5 months ago (2012-07-10 13:19:44 UTC) #1
Anton Muhin
lgtm https://chromiumcodereview.appspot.com/10735030/diff/1/tests/compiler/dart2js/unparser_test.dart File tests/compiler/dart2js/unparser_test.dart (right): https://chromiumcodereview.appspot.com/10735030/diff/1/tests/compiler/dart2js/unparser_test.dart#newcode137 tests/compiler/dart2js/unparser_test.dart:137: testDart2Dart(src, (String s) => Expect.equals(src, s)); definitely the ...
8 years, 5 months ago (2012-07-10 13:27:46 UTC) #2
Anton Muhin
Another option to consider: maybe add a flag to compiler not to synthesize constructors.
8 years, 5 months ago (2012-07-10 13:28:09 UTC) #3
Roman
On 2012/07/10 13:28:09, antonmuhin wrote: > Another option to consider: maybe add a flag to ...
8 years, 5 months ago (2012-07-10 13:47:10 UTC) #4
Roman
8 years, 5 months ago (2012-07-10 13:47:16 UTC) #5
https://chromiumcodereview.appspot.com/10735030/diff/1/tests/compiler/dart2js...
File tests/compiler/dart2js/unparser_test.dart (right):

https://chromiumcodereview.appspot.com/10735030/diff/1/tests/compiler/dart2js...
tests/compiler/dart2js/unparser_test.dart:137: testDart2Dart(src, (String s) =>
Expect.equals(src, s));
On 2012/07/10 13:27:46, antonmuhin wrote:
> definitely the time to introduce a helper which checks the string doesn't
change
> after dart2dart.

Done. If no continuation is passed to testDart2Dart() it will just check that
source does not change.

Powered by Google App Engine
This is Rietveld 408576698