Attention is currently required from: Lasse R.H. Nielsen.
1 comment:
Patchset:
We could make dart2js accept `new Symbol('>>>')` by editing the regexp that matches operators.
DDC does not enforce these constraints. Do you think we should relax them? (see
https://github.com/dart-lang/sdk/issues/34919)
To view, visit change 190140. To unsubscribe, or for help writing mail filters, visit settings.
Attention is currently required from: Lasse R.H. Nielsen.
Stephen Adams would like Lasse R.H. Nielsen to review this change.
[corelib] Symbol operator test update for >>>
Split `>>>` from the other cases (as /01 and /02) so
that failing `>>>` cases don't hide other failures.
/01 should start to work when --enable-experiment=triple-shift
becomes the default.
Change-Id: I24f2dae0494d873f2e35a29db3047fff0b7eaf59
---
M tests/corelib/symbol_operator_test.dart
M tests/corelib_2/symbol_operator_test.dart
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/tests/corelib/symbol_operator_test.dart b/tests/corelib/symbol_operator_test.dart
index c32837f..8ce8298 100644
--- a/tests/corelib/symbol_operator_test.dart
+++ b/tests/corelib/symbol_operator_test.dart
@@ -15,6 +15,7 @@
testSymbol(#%, $ % $, "%");
testSymbol(#<<, $ << $, "<<");
testSymbol(#>>, $ >> $, ">>");
+ testSymbol(#>>>, $ >>> $, ">>>"); //# 01: ok
testSymbol(#~, ~$, "~");
testSymbol(#|, $ | $, "|");
testSymbol(#&, $ & $, "&");
@@ -28,14 +29,17 @@
testSymbol(#[]=, ($[$] = $).lastMember, "[]=");
testSymbol(Symbol.unaryMinus, -$, "unary-");
- testSymbolThrows(">>>"); // //# 03: ok
- testSymbolThrows("!"); // //# 03: continued
+ testSymbolThrows(">>>"); // //# 02: ok
+
+ testSymbolThrows("!"); // //# 03: ok
testSymbolThrows("&&"); // //# 03: continued
testSymbolThrows("||"); // //# 03: continued
testSymbolThrows("?"); // //# 03: continued
testSymbolThrows("?:"); // //# 03: continued
+ testSymbolThrows("??"); // //# 03: continued
testSymbolThrows("#"); // //# 03: continued
testSymbolThrows("//"); // //# 03: continued
+ testSymbolThrows("!="); // //# 03: continued
}
void testSymbol(Symbol constSymbol, var mirrorSymbol, String name) {
diff --git a/tests/corelib_2/symbol_operator_test.dart b/tests/corelib_2/symbol_operator_test.dart
index ac79499..5666e16 100644
--- a/tests/corelib_2/symbol_operator_test.dart
+++ b/tests/corelib_2/symbol_operator_test.dart
@@ -15,6 +15,7 @@
testSymbol(#%, $ % $, "%");
testSymbol(#<<, $ << $, "<<");
testSymbol(#>>, $ >> $, ">>");
+ testSymbol(#>>>, $ >>> $, ">>>"); //# 01: ok
testSymbol(#~, ~$, "~");
testSymbol(#|, $ | $, "|");
testSymbol(#&, $ & $, "&");
@@ -28,14 +29,17 @@
testSymbol(#[]=, ($[$] = $).lastMember, "[]=");
testSymbol(Symbol.unaryMinus, -$, "unary-");
- testSymbolThrows(">>>"); // //# 03: ok
- testSymbolThrows("!"); // //# 03: continued
+ testSymbolThrows(">>>"); // //# 02: ok
+
+ testSymbolThrows("!"); // //# 03: ok
testSymbolThrows("&&"); // //# 03: continued
testSymbolThrows("||"); // //# 03: continued
testSymbolThrows("?"); // //# 03: continued
testSymbolThrows("?:"); // //# 03: continued
+ testSymbolThrows("??"); // //# 03: continued
testSymbolThrows("#"); // //# 03: continued
testSymbolThrows("//"); // //# 03: continued
+ testSymbolThrows("!="); // //# 03: continued
}
void testSymbol(Symbol constSymbol, var mirrorSymbol, String name) {
To view, visit change 190140. To unsubscribe, or for help writing mail filters, visit settings.
1 comment:
Patchset:
We could make dart2js accept `new Symbol('>>>')` by editing the regexp that matches operators. […]
I think we should. The VM also doesn't implement the check, so it's seems like wasted effort to keep doing it on dart2js (not sure what the analyzer does).
Haven't been a priority yet (which suggests that the restriction really is unnecessary).
To view, visit change 190140. To unsubscribe, or for help writing mail filters, visit settings.
Stephen Adams abandoned this change.
To view, visit change 190140. To unsubscribe, or for help writing mail filters, visit settings.