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

Unified Diff: pkg/compiler/lib/src/compile_time_constants.dart

Issue 1976213002: Adjusts dart2js backend to handle method type arguments. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Made MethodTypeVariableType malformed, eliminated malformMethodTypeVariableType Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/compile_time_constants.dart
diff --git a/pkg/compiler/lib/src/compile_time_constants.dart b/pkg/compiler/lib/src/compile_time_constants.dart
index 724e6f669eca41b3b3742ed62d178f622b6ba15a..101d8523f48af97e253b398e87cd0437eb4c4646 100644
--- a/pkg/compiler/lib/src/compile_time_constants.dart
+++ b/pkg/compiler/lib/src/compile_time_constants.dart
@@ -238,9 +238,15 @@ abstract class ConstantCompilerBase implements ConstantCompiler {
ConstantValue value = getConstantValue(expression);
if (elementType.isMalformed && !value.isNull) {
if (isConst) {
- ErroneousElement element = elementType.element;
- reporter.reportErrorMessage(
- node, element.messageKind, element.messageArguments);
+ if (elementType is MalformedType) {
Johnni Winther 2016/05/23 12:50:41 Add a TODO for me here; I'm not sure we should gen
eernst 2016/05/23 14:30:23 Done.
+ ErroneousElement element = elementType.element;
+ reporter.reportErrorMessage(
+ node, element.messageKind, element.messageArguments);
+ } else {
+ assert(elementType is MethodTypeVariableType);
+ reporter.reportErrorMessage(
+ node, MessageKind.TYPE_VARIABLE_FROM_METHOD_NOT_REIFIED);
+ }
} else {
// We need to throw an exception at runtime.
expression = null;

Powered by Google App Engine
This is Rietveld 408576698