Skip to content
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

Named arguments in async functions stopped working with consts of the same name #27659

Closed
enyo opened this issue Oct 24, 2016 · 0 comments
Closed
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.

Comments

@enyo
Copy link

enyo commented Oct 24, 2016

If the const name and the named parameter name are the same, then dart 1.20.1 fails with expression is not a valid compile-time constant.

const String lineLength = '120';

foo({lineLength: lineLength}) async {
  print(lineLength);
}

main() => foo();
  • Removing async on vm works
  • renaming one of lineLength: lineLength to something else works (so it only happens when they share the same name)
@floitschG floitschG added the area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. label Oct 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
Projects
None yet
Development

No branches or pull requests

3 participants