Ticket #122 (new defect)

Opened 4 months ago

Last modified 4 months ago

Uninitialized Variable Error misleading

Reported by: mspiegel Assigned to: EricAllen
Priority: major Milestone:
Component: interpreter Version:
Keywords: Cc:

Description

This time it's an actual bug. The following program is incorrect, I typed in "y = y factorial(x - 1)" instead of "y = x factorial(x - 1)" on line 24. However the attempt to read uninitialized variable is reported on line 29, where the function is called.

Attachments

factorial.fss (0.9 kB) - added by mspiegel on 05/30/08 06:53:29.

Change History

05/30/08 06:53:29 changed by mspiegel

  • attachment factorial.fss added.

05/30/08 07:04:16 changed by jmaessen

This is because we're failing to set context information when the error is thrown, so we're seeing calling context information but not information at the point where the error occurs. Will look into this, it should be an easy fix.

05/30/08 07:04:21 changed by jmaessen

  • owner changed from dr2chase to jmaessen.
  • status changed from new to assigned.

05/30/08 07:04:45 changed by jmaessen

  • summary changed from Parser Error misleading to Uninitialized Variable Error misleading.

05/30/08 08:41:29 changed by jmaessen

  • owner changed from jmaessen to EricAllen.
  • status changed from assigned to new.

This was failing dynamically; I have improved the dynamic error reporting in r1749 so it now reports the correct source location. I'm pushing this over the fence to static checking, which is where it actually ought to be caught and reported. If the static checker is catching it with correct location information, feel free to mark as resolved.