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

Need a warning in case of infinite loop in getter/setter #17309

Closed
DartBot opened this issue Mar 6, 2014 · 8 comments
Closed

Need a warning in case of infinite loop in getter/setter #17309

DartBot opened this issue Mar 6, 2014 · 8 comments
Labels
type-enhancement A request for a change that isn't a bug

Comments

@DartBot
Copy link

DartBot commented Mar 6, 2014

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


What steps will reproduce the problem?
1.
   Make a mistake in a getter/setter pair that will lead to an
infinite loop :

    for instance :

   int get x => _x ;
   int set x (val) { x = val; } // instead of _x = val == >> infinite loop

2.
   launch the application.

  
What is the expected output? What do you see instead?

  a warning before the launch

And / OR

  a stack overflow exception leading to the faulty line.
 

What version of the product are you using? On what operating system?

  stable build 33014 on Mac OS 10.9.1

@DartBot
Copy link
Author

DartBot commented Mar 6, 2014

This comment was originally written by vincent...@gmail.com


OOps i forgot to say (too bad no edit is possible) :
The result is a plain hard crash with the message
<error>
and the chromium browser doing a sad face...
 

@lrhn
Copy link
Member

lrhn commented Mar 6, 2014

Better handling of stack overflows.

Sad tabs should be avoided. Crashing isn't a valid strategy in a browser.


Removed Type-Defect label.
Added Type-Enhancement, Area-Dartium, Triaged labels.

@vsmenon
Copy link
Member

vsmenon commented Jun 4, 2014

Added Dartium-Crasher label.

@vsmenon
Copy link
Member

vsmenon commented Jun 4, 2014

Added this to the 1.5 milestone.

@kasperl
Copy link

kasperl commented Jun 4, 2014

Postponing to 1.6. Feel free to change this back (and give it a proper priority).


Removed this from the 1.5 milestone.
Added this to the 1.6 milestone.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Removed this from the 1.6 milestone.
Added Oldschool-Milestone-1.6 label.

@kasperl
Copy link

kasperl commented Aug 4, 2014

Removed Oldschool-Milestone-1.6 label.

@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed priority-unassigned labels Feb 29, 2016
@matanlurey matanlurey removed the closed-obsolete Closed as the reported issue is no longer relevant label Feb 9, 2018
@natebosch
Copy link
Member

For getters specifically there is a lint that can help out
http://dart-lang.github.io/linter/lints/recursive_getters.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

7 participants