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

Issue 9186017: Fix crash in dartc when given cyclic type variable bounds. (Closed)

Created:
8 years, 11 months ago by zundel
Modified:
8 years, 10 months ago
Reviewers:
mmendez, gbracha
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Fix crash in dartc when given cyclic type variable bounds. http://code.google.com/p/dart/issues/detail?id=211 Committed: https://code.google.com/p/dart/source/detail?r=3751

Patch Set 1 : Updated unit test #

Total comments: 8

Patch Set 2 : Updated test #

Total comments: 4

Patch Set 3 : Updated test to remove reference to FunctionAlias with type parameter #

Patch Set 4 : Went back to prior verion of tests. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+149 lines, -7 lines) Patch
M compiler/java/com/google/dart/compiler/resolver/TypeErrorCode.java View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java View 1 2 3 4 chunks +33 lines, -1 line 0 comments Download
M compiler/java/com/google/dart/compiler/type/Types.java View 1 2 3 5 chunks +16 lines, -4 lines 1 comment Download
M compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTest.java View 1 2 3 1 chunk +21 lines, -0 lines 0 comments Download
M compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerTestCase.java View 3 1 chunk +2 lines, -2 lines 0 comments Download
M tests/language/language-leg.status View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
A tests/language/src/CyclicTypeVariableTest.dart View 1 3 1 chunk +61 lines, -0 lines 0 comments Download
A tests/language/src/FunctionTypeAlias2NegativeTest.dart View 1 1 chunk +13 lines, -0 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
zundel
@Gilad, could you look @ the file CyclicTypeVariableTest.dart? My goal is to make this as ...
8 years, 11 months ago (2012-01-11 22:00:19 UTC) #1
gbracha
See comments: much of the test is legal code. http://codereview.chromium.org/9186017/diff/4001/tests/language/src/CyclicTypeVariableTest.dart File tests/language/src/CyclicTypeVariableTest.dart (right): http://codereview.chromium.org/9186017/diff/4001/tests/language/src/CyclicTypeVariableTest.dart#newcode9 tests/language/src/CyclicTypeVariableTest.dart:9: ...
8 years, 11 months ago (2012-01-11 23:04:34 UTC) #2
zundel
http://codereview.chromium.org/9186017/diff/4001/tests/language/src/CyclicTypeVariableTest.dart File tests/language/src/CyclicTypeVariableTest.dart (right): http://codereview.chromium.org/9186017/diff/4001/tests/language/src/CyclicTypeVariableTest.dart#newcode19 tests/language/src/CyclicTypeVariableTest.dart:19: extends List<U> /// 03: static type error On 2012/01/11 ...
8 years, 11 months ago (2012-01-12 12:53:54 UTC) #3
mmendez
Thanks for digging into this one Eric. Lets get the tests nailed down then we'll ...
8 years, 11 months ago (2012-01-12 15:29:50 UTC) #4
zundel
http://codereview.chromium.org/9186017/diff/4001/tests/language/src/CyclicTypeVariableTest.dart File tests/language/src/CyclicTypeVariableTest.dart (right): http://codereview.chromium.org/9186017/diff/4001/tests/language/src/CyclicTypeVariableTest.dart#newcode12 tests/language/src/CyclicTypeVariableTest.dart:12: interface A<S On 2012/01/12 15:29:50, mmendez wrote: > This ...
8 years, 11 months ago (2012-01-12 15:33:59 UTC) #5
gbracha
On 2012/01/12 12:53:54, zundel wrote: > http://codereview.chromium.org/9186017/diff/4001/tests/language/src/CyclicTypeVariableTest.dart > File tests/language/src/CyclicTypeVariableTest.dart (right): > > http://codereview.chromium.org/9186017/diff/4001/tests/language/src/CyclicTypeVariableTest.dart#newcode19 > ...
8 years, 11 months ago (2012-01-12 17:02:59 UTC) #6
gbracha
8 years, 11 months ago (2012-01-12 17:04:48 UTC) #7
zundel
Please take another look at the test. I added a second test file because one ...
8 years, 11 months ago (2012-01-13 17:25:22 UTC) #8
gbracha
See remaining comment: function type aliases cannot be generic. http://codereview.chromium.org/9186017/diff/7001/tests/language/src/CyclicTypeVariableTest.dart File tests/language/src/CyclicTypeVariableTest.dart (right): http://codereview.chromium.org/9186017/diff/7001/tests/language/src/CyclicTypeVariableTest.dart#newcode12 tests/language/src/CyclicTypeVariableTest.dart:12: ...
8 years, 11 months ago (2012-01-13 22:53:47 UTC) #9
zundel
http://codereview.chromium.org/9186017/diff/7001/tests/language/src/CyclicTypeVariableTest.dart File tests/language/src/CyclicTypeVariableTest.dart (right): http://codereview.chromium.org/9186017/diff/7001/tests/language/src/CyclicTypeVariableTest.dart#newcode12 tests/language/src/CyclicTypeVariableTest.dart:12: extends T /// 01: static type error On 2012/01/13 ...
8 years, 11 months ago (2012-01-17 13:17:03 UTC) #10
zundel
http://codereview.chromium.org/9186017/diff/7001/tests/language/src/CyclicTypeVariableTest.dart File tests/language/src/CyclicTypeVariableTest.dart (right): http://codereview.chromium.org/9186017/diff/7001/tests/language/src/CyclicTypeVariableTest.dart#newcode12 tests/language/src/CyclicTypeVariableTest.dart:12: extends T /// 01: static type error (I can ...
8 years, 11 months ago (2012-01-17 13:19:17 UTC) #11
zundel
Please take another look. In addition to get ridding of the function type alias example ...
8 years, 11 months ago (2012-01-18 20:31:11 UTC) #12
zundel
This review is currently blocked waiting for word on whether or not function type aliases ...
8 years, 11 months ago (2012-01-23 18:46:55 UTC) #13
gbracha
On 2012/01/23 18:46:55, zundel wrote: > This review is currently blocked waiting for word on ...
8 years, 11 months ago (2012-01-24 18:13:06 UTC) #14
zundel
I backed down 2 patch set 2 and merged up to tip of trunk. Ready ...
8 years, 11 months ago (2012-01-24 19:51:16 UTC) #15
gbracha
On 2012/01/24 19:51:16, zundel wrote: > I backed down 2 patch set 2 and merged ...
8 years, 11 months ago (2012-01-24 19:58:33 UTC) #16
zundel
@mmendez: ping Feel free to re-assign the review to someone else.
8 years, 10 months ago (2012-01-31 15:25:05 UTC) #17
mmendez
On 2012/01/31 15:25:05, zundel wrote: > @mmendez: ping > > Feel free to re-assign the ...
8 years, 10 months ago (2012-01-31 19:30:26 UTC) #18
mmendez
8 years, 10 months ago (2012-01-31 19:30:51 UTC) #19
lgtm

http://codereview.chromium.org/9186017/diff/25001/compiler/java/com/google/da...
File compiler/java/com/google/dart/compiler/type/Types.java (right):

http://codereview.chromium.org/9186017/diff/25001/compiler/java/com/google/da...
compiler/java/com/google/dart/compiler/type/Types.java:307: return
typeProvider.getObjectType();
Nit: should this be the bound of the type variable?  Or are you trying to enable
code generation in the presence of a type warning?

Either way, it would be good to add a comment here and explain what is expected.

Powered by Google App Engine
This is Rietveld 408576698