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

Issue 11633024: Issue 3223. Don't report warning when call variable with not-function inferred type. (Closed)

Created:
8 years ago by scheglov
Modified:
8 years ago
Reviewers:
Brian Wilkerson
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Issue 3223. Don't report warning when call variable with not-function inferred type. http://code.google.com/p/dart/issues/detail?id=3223 R=brianwilkerson@google.com BUG= Committed: https://code.google.com/p/dart/source/detail?r=16356

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -6 lines) Patch
M compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java View 3 chunks +13 lines, -6 lines 2 comments Download
M compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java View 1 chunk +14 lines, -0 lines 0 comments Download
M tests/language/language.status View 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
scheglov
8 years ago (2012-12-19 20:54:11 UTC) #1
Brian Wilkerson
LGTM, although I have to wonder whether this will stop reporting errors in some places ...
8 years ago (2012-12-19 21:23:40 UTC) #2
scheglov
8 years ago (2012-12-20 00:59:44 UTC) #3
We don't override type when of variable when it is specified explicitly.
So, this code still gives warning.

void m() {
  num n = 1;
  n();
}

https://codereview.chromium.org/11633024/diff/1/compiler/java/com/google/dart...
File compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java (right):

https://codereview.chromium.org/11633024/diff/1/compiler/java/com/google/dart...
compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java:1030: if
(!types.isAssignable(t, s)) {
On 2012/12/19 21:23:40, Brian Wilkerson wrote:
> I believe that 1029 - 1034 could be replaced by "return types.isAssignable(t,
> s);", which would be cleaner.

Done.

Powered by Google App Engine
This is Rietveld 408576698