Skip to content

do multiple assignments when function returns #18529

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

Closed
DartBot opened this issue Apr 29, 2014 · 1 comment
Closed

do multiple assignments when function returns #18529

DartBot opened this issue Apr 29, 2014 · 1 comment

Comments

@DartBot
Copy link

DartBot commented Apr 29, 2014

This issue was originally filed by onurca...@gmail.com


What steps will clearly show the issue / need for enhancement?
Dart doesn't have option to pass primitive types by reference to functions.
So can you make something like constructors class_name(this.a,this.b) but not the same.

f(a,b)
{
  return [a+b,a*b];
}

void main()
{
  int b = 10;
  int d = 5;
  [b,d] = f(b,d); // i expect here to chance b's value to b+d, d's value
                  // to b*d
}

like this

What version of the product are you using? On what operating system?
Dart Editor version 1.3.3.release (STABLE)
Dart SDK version 1.3.3
win 7 sp1 x64

@lrhn
Copy link
Member

lrhn commented Apr 30, 2014

Added Duplicate label.
Marked as being merged into #10310.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants