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

Generated injectors fail on raw strings #1591

Closed
matanlurey opened this issue Aug 21, 2018 · 0 comments
Closed

Generated injectors fail on raw strings #1591

matanlurey opened this issue Aug 21, 2018 · 0 comments

Comments

@matanlurey
Copy link
Contributor

(From internal issue b/112890636)

If you write the following:

import 'package:angular/angular.dart';
import 'this_file.template.dart' as ng;

@GenerateInjector(const [
  ValueProvider(String, r'$5.00 USD'),
])
final InjectorFactory example = ng.example$Injector;

... a compile-time error will be eventually issued, because we will generate:

'$5.00 USD' instead of r'$5.00 USD'. We need to retain the raw-ness of the String.

@matanlurey matanlurey added this to the =v5.1.0 milestone Aug 21, 2018
@matanlurey matanlurey self-assigned this Aug 21, 2018
matanlurey added a commit that referenced this issue Aug 22, 2018
I imagine this is a safe change, but I will run all internal tests just-in-case.

Closes #1591.
Closes #1592.

PiperOrigin-RevId: 209671699
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

1 participant