Skip to content
This repository was archived by the owner on Sep 16, 2022. It is now read-only.

DDC needs to stop skipping type build/runtime checks #1360

Closed
matanlurey opened this issue May 31, 2018 · 3 comments
Closed

DDC needs to stop skipping type build/runtime checks #1360

matanlurey opened this issue May 31, 2018 · 3 comments

Comments

@matanlurey
Copy link
Contributor

As hit internally:

import 'package:angular/angular.dart';

const windowBindings = const [ ... ];

const tableBindings = const [
  windowBindings,
  const ClassProvider(OtherClass),
];

const tableModule = const Module(
  provide: tableBindings,
);

See the error? Well, Module.provide only takes a List<Provider>, but is being passed a List<Object> (or is it List<dynamic>?). This passes type-checking during build-time (and DDC runtime), but will fail in Dart2JS - and will fail otherwise in our actual framework code, because I assume every element is a Provider.

I think this is due to List currently being a white-listed "skip checks on me", thing. The CFE has no such concept, and Dart2JS with --preview-dart-2, will fail.

@matanlurey
Copy link
Contributor Author

This is not related to DDC

@kevmoo
Copy link
Member

kevmoo commented May 31, 2018

This is not related to DDC

Huh? Different title?

@matanlurey
Copy link
Contributor Author

Closing. This is actually dart-lang/sdk#33304.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants