You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 22, 2018. It is now read-only.
When implementing inference on overriden methods and fields, I encountered a bug that only affects types with generics that are part of a library cycle.
The source of the problem is likely related to where in the pipeline we are running our inference. In particular, we do it right after the super classes have been resolved, and before our members are, however I'm not sure yet on why this is happening.
Here is an example flaky test that illustrates the problem. This test passes often, but sometimes fail with a null pointer exception:
testChecker({
'/a.dart':''' import 'main.dart'; abstract class I<E> { A<E> m(a, String f(v, T e)); } ''',
'/main.dart':''' import 'a.dart'; abstract class A<E> implements I<E> { const A(); E value; } abstract class M { int y; } class B<E> extends A<E> implements M { const B(); int get y => 0; m(a, f(v, T e)) {} } foo () { int y = /*severe:StaticTypeError*/new B<String>().m(null, null).value; String z = new B<String>().m(null, null).value; } '''
}, inferFromOverrides:true);
When implementing inference on overriden methods and fields, I encountered a bug that only affects types with generics that are part of a library cycle.
The source of the problem is likely related to where in the pipeline we are running our inference. In particular, we do it right after the super classes have been resolved, and before our members are, however I'm not sure yet on why this is happening.
Here is an example flaky test that illustrates the problem. This test passes often, but sometimes fail with a null pointer exception:
When it fails, this is the exception we see:
The text was updated successfully, but these errors were encountered: