ID:93800
 
Not a bug
BYOND Version:464
Operating System:Windows XP Pro
Web Browser:Firefox 3.6.2
Applies to:DM Language
Status: Not a bug

This is not a bug. It may be an incorrect use of syntax or a limitation in the software. For further discussion on the matter, please consult the BYOND forums.
Descriptive Problem Summary:

Login() can nest inside Login() to create an infinite loop, yet compiler doesn't catch this.

Numbered Steps to Reproduce Problem:

Nest Login() inside another login (place a simple hello world text to see results)

Code Snippet (if applicable) to Reproduce Problem:
mob
Login() //Loops forever
world << "I WILL BREAK DREAMSEEKER!"

Login()


Expected Results:

To break Dream Seeker, or at least to see if the compiler catches this.

Actual Results:

A hilariously funny runtime error saying it loops forever but eventually stops looping.

When does the problem NOT occur?

Not using a form of any output when Login() occurs.

-------------------


I'm just playing around to see what I can do to break DM to avoid and recognize future bugs. I really didn't expect this to work, nor I would expect anybody to try it. I know, who in their right mind would do this in the first place? I just don't get why it's logical to allow Login() to nest into Login() in the first place to create an infinite loop just to fail.

Just thought I'd mention something. Doubt anyone has tried this anyway. If they did I doubt anyone would mention it because it's so petty to report.
You didn't include a code snippet. Considering this is a problem related to syntax and compilation that's absolutely necessary.
Oh I'm sorry I forgot to include it. I edited the post above and it includes one.
This isn't a bug. I thought you were talking about a case where you could crash the compiler. The compiler is not able to tell when you have an infinite recursion because sometimes recursions are perfectly valid.