Skip to content

Commit

Permalink
Refine backprop assignments in error message (#87)
Browse files Browse the repository at this point in the history
This PR refines the error message by incorporating information about the
assignments. Following is an example of an informative error message:

Code snippet:
```
func test(x *int) {
	x = nil
	y := x
	z := y
	print(*z)
}
```

Error message:
```
Potential nil panic detected. Observed nil flow from source to dereference point: 
   -> errormessage/errormessage.go:32:9: literal `nil` dereferenced via the assignment(s):
        -> `nil` to `x` at errormessage/errormessage.go:29:2,
        -> `x` to `y` at errormessage/errormessage.go:30:2,
        -> `y` to `z` at errormessage/errormessage.go:31:2
```

[closes #83 ]
[depends on #86 ]
  • Loading branch information
sonalmahajan15 authored Jan 17, 2024
1 parent a1668d2 commit 302cf5e
Show file tree
Hide file tree
Showing 6 changed files with 856 additions and 131 deletions.
Loading

0 comments on commit 302cf5e

Please sign in to comment.