You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can repo this in Dartium but not in the command-line. I think the Dartium debugger is evaluating f when it hits a breakpoint and causes the print statement to execute.
We aren't evaluating f. That would be a catastrophic bug.
The issue is we are evaluating toString() on the object which isn't good either but has more limited negative consequences. I'm working on getting rid of the toString calls as well as obviously we shouldn't be triggering side effects without the user at least triggering that they want to expand out all properties for an object.
kevmoo
added
P2
A bug or feature request we're likely to work on
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
and removed
triaged
labels
Mar 1, 2016
This issue was originally filed by kiuhnm...@gmail.com
void main() {
int count = 0;
f(x) {
print("v($count) = $x"); // <--- breakpoint here
count++;
}
[1,2,3].map(f).toList();
}
Before the breakpoint is hit, the program outputs
v(0) = 1 (:438)
v(1) = 1 (:438)
v(2) = 3 (:438)
v(3) = 3 (:438)
v(4) = 1 (:438)
v(5) = 1 (:438)
v(6) = 3 (:438)
v(7) = 3 (:438)
Note that if you create a command-line application everything works fine.
The text was updated successfully, but these errors were encountered: