Open bitfield opened 5 years ago
This solution breaks Exalysis, and presumably now also go-analyzer. Here's the problem:
go-analyzer
for { ... }
In examExtensiveForLoop, this code assumes that every for loop will have a condition:
examExtensiveForLoop
for
if loop.Cond().FindFirstByName(paramName) != nil { ... }
In this case, loop.Cond() is nil:
loop.Cond()
panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0xa0 pc=0x1466eed] goroutine 1 [running]: github.com/exercism/exalysis/track/raindrops.examExtensiveForLoop(0xc0000d0140, 0xc0001d20c0) /Users/john/git/bitfield/exalysis/track/raindrops/raindrops.go:116 +0x16d
Test case added in feature/raindrops branch
feature/raindrops
This solution breaks Exalysis, and presumably now also
go-analyzer
. Here's the problem:In
examExtensiveForLoop
, this code assumes that everyfor
loop will have a condition:In this case,
loop.Cond()
is nil: