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

Unified Diff: compiler/java/com/google/dart/compiler/type/InferredType.java

Issue 10459070: Infer also field types in classes and top-level (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Use Type.isInferred() Created 8 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: compiler/java/com/google/dart/compiler/type/InferredType.java
diff --git a/compiler/java/com/google/dart/compiler/type/InferredType.java b/compiler/java/com/google/dart/compiler/type/InferredType.java
deleted file mode 100644
index e5ea3516fe59db9f9880692cab6c71368008b95a..0000000000000000000000000000000000000000
--- a/compiler/java/com/google/dart/compiler/type/InferredType.java
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) 2012, 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.
-
-package com.google.dart.compiler.type;
-
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-
-/**
- * Marker interface for {@link Type} which means that this {@link Type} was not specified by user,
- * but instead inferred from context.
- */
-public interface InferredType {
- public static class Helper {
- /**
- * @return the mix of the given {@link Type} interface and {@link InferredType}.
- */
- public static Type make(final Type type) {
- if (type instanceof InterfaceType) {
- return (Type) Proxy.newProxyInstance(type.getClass().getClassLoader(), new Class<?>[] {
- InterfaceType.class,
- InferredType.class}, new InvocationHandler() {
- @Override
- public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
- return method.invoke(type, args);
- }
- });
- }
- return type;
- }
- }
-}

Powered by Google App Engine
This is Rietveld 408576698