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

Issue 10108014: Another case of creating from factory constructors was not taken into account in r6619 (Closed)

Created:
8 years, 8 months ago by zundel
Modified:
8 years, 8 months ago
Reviewers:
ahe, scheglov
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Another case of creating from factory constructors was not taken into account in r6619 http://code.google.com/p/dart/issues/detail?id=2282 Committed: https://code.google.com/p/dart/source/detail?r=6636

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+47 lines, -15 lines) Patch
M compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java View 1 chunk +13 lines, -11 lines 0 comments Download
M compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java View 3 chunks +34 lines, -4 lines 2 comments Download

Messages

Total messages: 4 (0 generated)
zundel
That last change I did not properly handle classes that are abstract because they do ...
8 years, 8 months ago (2012-04-17 11:14:01 UTC) #1
ahe
LGTM http://codereview.chromium.org/10108014/diff/1/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java File compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java (right): http://codereview.chromium.org/10108014/diff/1/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java#newcode464 compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java:464: " return new A();", // no error, factory ...
8 years, 8 months ago (2012-04-17 11:44:55 UTC) #2
scheglov
LGTM
8 years, 8 months ago (2012-04-17 13:04:51 UTC) #3
zundel
8 years, 8 months ago (2012-04-17 13:49:17 UTC) #4
http://codereview.chromium.org/10108014/diff/1/compiler/javatests/com/google/...
File
compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
(right):

http://codereview.chromium.org/10108014/diff/1/compiler/javatests/com/google/...
compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java:464:
"    return new A();",  // no error, factory constructor
Since I know the invoking factory method warning is an issue, I committed as is
and added issue http://code.google.com/p/dart/issues/detail?id=2619

This could be a 'value added' warning. But, I've seen it come out in what might
be seen as a nuisance warning in some contexts.  We need to get a story on being
able to turn individual warnings on and off.


On 2012/04/17 11:44:55, ahe wrote:
> Actually, this should never cause a warning. This is because the spec was
> changed after I implemented the original algorithm for abstract.
> 
> This is definition from the spec:
> 
> "An abstract class is either a class that is explicitly declared with the
> abstract modifier, or a class that declares at least one abstract method
> (7.1.1)."
> 
> So A is not an abstract class.
> 
> However, then the idea was that we would warn about classes that have
> unimplemented methods but not marked abstract. But I can't find this part in
the
> spec.

Powered by Google App Engine
This is Rietveld 408576698