-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Imprecise type analysis of window.document.elements #380
Comments
Has anyone had a chance to look at this issue yet? Set owner to mmendez@google.com. |
This comment was originally written by zundel@google.com The plot thickens: #import('dart:html'); main() { causes the compiler to run out of stack: $ dartc_test /tmp/t.dart |
Thanks for taking a look. This is the same problem seen in 1398. Please see the detailed analysis there. From Element.dart: // TODO: The type of value should be Collection<Element>. See http://b/5392897 |
This comment was originally written by zundel@google.com The underlying problem is there is no type on this getter/setter. Apparently dartc chokec when the setter and getter did not have the same type, but that is no longer the case. https://chromiumcodereview.appspot.com/9315061/ Once we get the updated library integrated, let me know if the problem persists. Set owner to zundel@google.com. |
This comment was originally written by zundel@google.com The problem persists: ref b/5392897 class Test<E> { main() { file:/tmp/foo2.dart:9: Use assignment to set field "bar" in Test<int> |
Marked this as blocking #1531. |
This comment was originally written by zundel@google.com Updated patch at https://chromiumcodereview.appspot.com/9315061/ Added Fixed label. |
2019-06-11 tvolkert@users.noreply.github.com More fixes to cast response to Stream<List<int>> (#385) 2019-06-11 tvolkert@users.noreply.github.com Pass Uint8List to Datagram (#382) 2019-06-11 tvolkert@users.noreply.github.com Cast HttpRequest and HttpClientResponse streams to List<int> (#384) 2019-06-10 sgrekhov@unipro.ru Fixes #364. Change expected result to null for default values of clientMaxWindowBits and serverMaxWindowBits 2019-06-07 sgrekhov@unipro.ru Fixes #380. Added tests for logical and bitwise operations via type aliases 2019-06-07 sgrekhov@unipro.ru Additional fix for #373. Code style improved and more strict pattern checking 2019-06-06 sgrekhov@unipro.ru Fix for #380. Added tests for type aliases for built-in types. Test string concatenation and arithmetic operations 2019-06-05 sgrekhov@unipro.ru Fixes #380. Added tests for type aliases for built-in types initialization 2019-06-05 sgrekhov@unipro.ru Fixes #373. Expect reasonable file mode on Unix 2019-06-04 sgrekhov@unipro.ru Fixes #379. Numerous fixes for io/Process tests 2019-06-04 sgrekhov@unipro.ru Fixes #378. Use Platform.resolvedExecutable instead of 'dart' command 2019-06-04 irina.arkhipets@gmail.com Fixed Issue #375: it's possible that IPv6 loopback does not exist. 2019-06-04 irina.arkhipets@gmail.com Fixed Issue #236: host.host can be either "localhost" or Platform.localHostname. 2019-06-04 irina.arkhipets@gmail.com Issue #370, instantiate-to-bounds: added static tests for non-function type aliases. 2019-06-04 sgrekhov@unipro.ru Fix for #377. Use correct network interface type name (IPvX) 2019-06-04 sgrekhov@unipro.ru Fixes #374. Change pattern for error messages 2019-06-04 irina.arkhipets@gmail.com Issue #370, instantiate-to-bounds: added dynamic tests for non-function type aliases. 2019-06-04 sgrekhov@unipro.ru Fix for #372. Expect.fail() on timeout added 2019-06-04 sgrekhov@unipro.ru Fixes #371. Remove excessive asyncStart() 2019-06-03 irina.arkhipets@gmail.com Issue #147, test super bounded types: added tests for non-function type aliases. 2019-05-30 sgrekhov@unipro.ru Fixes #369. Use correct type arguments to avoid errors 2019-05-30 sgrekhov@unipro.ru Fixes #368. Don't try to bind system port 2019-05-30 sgrekhov@unipro.ru Fixes #367. Remove excessive asyncStart() 2019-05-30 sgrekhov@unipro.ru Fixes #366. Change expected result to SocketException TBR=whesse@google.com Change-Id: I137689755907b3333e597d7d210db2b4d37d70d0 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105641 Reviewed-by: Alexander Thomas <athom@google.com> Reviewed-by: William Hesse <whesse@google.com>
Revisions updated by `dart tools/rev_sdk_deps.dart`. ecosystem (https://github.com/dart-lang/ecosystem/compare/ed39318..dcf5c4f): dcf5c4f 2023-09-20 Parker Lougheed Simplify dart_flutter_team_lints install instructions (#172) http (https://github.com/dart-lang/http/compare/decefa6..1251619): 1251619 2023-09-19 Brian Quinlan Add the ability to control the URL cache. (#1020) mockito (https://github.com/dart-lang/mockito/compare/412c0be..097e563): 097e563 2023-09-19 Ilya Yanok Add a missing dummy `bool` value shelf (https://github.com/dart-lang/shelf/compare/e2a02b7..4851978): 4851978 2023-09-20 Kevin Moore shelf_router_generator: prepare to release v1.1.0 (#380) test (https://github.com/dart-lang/test/compare/6449495..8191a35): 8191a355 2023-09-20 Nate Bosch Drop a TODO about running browser after compile (#2094) d8e9d87d 2023-09-18 Nate Bosch Add a silent reporter (#2093) tools (https://github.com/dart-lang/tools/compare/70d778d..3c248df): 3c248df 2023-09-21 Devon Carew misc infra updates for dart-lang/tools (#165) Change-Id: I436a34847db75f45a20b8c18996419f88214485f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/327280 Auto-Submit: Devon Carew <devoncarew@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This is in dom:html, the definition of class Document (actually, the interface Element that it inherits from). The problem appears to be that the field elements has dynamic type even though the getter is defined as ElementList.
Since the type of window.document.elements is dynamic, code completion can offer no proposals, which surprised users (in a negative way).
TypeAnalyzer should return ElementList for the type of window.document.elements.
The text was updated successfully, but these errors were encountered: