forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Teach frontend compiler to replace
toString
with super.toString
f…
…or selected packages (flutter#17068) Adds annotation `keepToString` to opt out.
- Loading branch information
Showing
13 changed files
with
539 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
!.packages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Generated by pub on 2020-01-15 10:08:29.776333. | ||
flutter_frontend_fixtures:lib/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright 2013 The Flutter Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
import 'dart:convert'; | ||
import 'dart:ui'; | ||
|
||
void main() { | ||
final Paint paint = Paint()..color = Color(0xFFFFFFFF); | ||
print(jsonEncode(<String, String>{ | ||
'Paint.toString': paint.toString(), | ||
'Foo.toString': Foo().toString(), | ||
'Keep.toString': Keep().toString(), | ||
})); | ||
} | ||
|
||
class Foo { | ||
@override | ||
String toString() => 'I am a Foo'; | ||
} | ||
|
||
class Keep { | ||
@keepToString | ||
@override | ||
String toString() => 'I am a Keep'; | ||
} |
Oops, something went wrong.