static const String canBeUsedAsTypePragmaName =Note: we are not using this yet, so we can wait to add this until we need it. Thoughts: are there any entities in the SDK we currently label as callable that we may want to label as `can-be-used-as-type` instead?
(pragma_name != Symbols::dyn_module_can_be_used_as_type().ptr())) {I have less familiarity here, so I'm not sure if this is the right change. Without this, end-to-end tests pass in debug-mode but crash in release-mode.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
void testCanBeUsedAsType(Object? o) {Add tests for types that are inferred. For instance if you allow `B` and `C` but not `A` in
class A {}
class B extends A {}
class C extends A {}
then the inferred type `A` in this should be flagged:var list = [B(), C()];
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
"'implicitly-extendable', or 'can-be-used-as-type'.\n"We don't support these values in the entry-point pragmas, so the updated message is misleading.
"'call', or 'can-be-used-as-type'.\n"ditto
(pragma_name != Symbols::dyn_module_can_be_used_as_type().ptr())) {I have less familiarity here, so I'm not sure if this is the right change. Without this, end-to-end tests pass in debug-mode but crash in release-mode.
This makes `dyn-module:can-be-used-as-type` pragma behave pretty much like `dyn-module:callable`, i.e. VM would treat annotated class as instantiated. I think we need a proper implementation in the VM - see uses of this function.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |