Closed i582 closed 3 years ago
/** * @param list<non-empty-array<string, non-empty-list<non-empty-list<string>>>>|null $assertions */ public function setAssertions(PhpParser\Node\Expr $node, ?array $assertions) : void { if (!$this->cache_assertions) { return; } $this->node_assertions[$node] = $assertions; }
From here.
Panic.
Stack trace: goroutine 58 [running]: runtime/debug.Stack(0xc000794408, 0xd8bd40, 0x13aaf70) C:/Go/src/runtime/debug/stack.go:24 +0xa5 github.com/VKCOM/noverify/src/linter.(*Worker).ParseContents.func1(0xc0022c1000, 0x30, 0xc000795d90) C:/projects/noverify-/noverify/src/linter/worker.go:84 +0x75 panic(0xd8bd40, 0x13aaf70) C:/Go/src/runtime/panic.go:969 +0x176 github.com/VKCOM/noverify/src/phpdoc.(*TypeParser).parseExpr(0xc000367180, 0xe0008c500, 0xc0007947e8) C:/projects/noverify-/noverify/src/phpdoc/type_parser.go:377 +0x2d3 github.com/VKCOM/noverify/src/phpdoc.(*TypeParser).parseExpr(0xc000367180, 0x0, 0xc001b32240) C:/projects/noverify-/noverify/src/phpdoc/type_parser.go:273 +0x11c5 github.com/VKCOM/noverify/src/phpdoc.(*TypeParser).parseExprInsideGroup(0xc000367180, 0xc002502900) C:/projects/noverify-/noverify/src/phpdoc/type_parser.go:200 +0x45 github.com/VKCOM/noverify/src/phpdoc.(*TypeParser).parseExpr(0xc000367180, 0x0, 0xc002946320) C:/projects/noverify-/noverify/src/phpdoc/type_parser.go:373 +0x2c5 github.com/VKCOM/noverify/src/phpdoc.(*TypeParser).Parse(0xc000367180, 0xc003800fcf, 0x46, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...) C:/projects/noverify-/noverify/src/phpdoc/type_parser.go:174 +0x9f github.com/VKCOM/noverify/src/phpdoc.nextTypeField(0xc000367180, 0xc003800fcf, 0x46, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...) C:/projects/noverify-/noverify/src/phpdoc/parser.go:158 +0x8f github.com/VKCOM/noverify/src/phpdoc.parseTypeVarComment(0xc000367180, 0x2, 0xc003800fc9, 0x5, 0xc003800fcf, 0x46, 0xc0002fc540) C:/projects/noverify-/noverify/src/phpdoc/parser.go:139 +0x288 github.com/VKCOM/noverify/src/phpdoc.Parse(0xc000367180, 0xc003800fc0, 0x5a, 0xe02820, 0x1, 0xc0024fe510) C:/projects/noverify-/noverify/src/phpdoc/parser.go:95 +0x3f3 github.com/VKCOM/noverify/src/ir/irconv.(*Converter).parsePHPDoc(0xc001c21980, 0xc003800fc0, 0x5a, 0xc001b0ef80, 0xc000183040, 0x1) C:/projects/noverify-/noverify/src/ir/irconv/irconv.go:1830 +0x4f github.com/VKCOM/noverify/src/ir/irconv.(*Converter).convNode(0xc001c21980, 0xf55a00, 0xc0024f41c0, 0xf4c040, 0xc001b0ef80) C:/projects/noverify-/noverify/src/ir/irconv/irconv.go:1409 +0x83e5 github.com/VKCOM/noverify/src/ir/irconv.(*Converter).convNode(0xc001c21980, 0xf53a80, 0xc0002fc180, 0x0, 0x4b7ff1c03000603) C:/projects/noverify-/noverify/src/ir/irconv/irconv.go:1054 +0x242c github.com/VKCOM/noverify/src/ir/irconv.(*Converter).ConvertNode(...) C:/projects/noverify-/noverify/src/ir/irconv/irconv.go:48 github.com/VKCOM/noverify/src/ir/irconv.(*Converter).ConvertRoot(...) C:/projects/noverify-/noverify/src/ir/irconv/irconv.go:43 github.com/VKCOM/noverify/src/linter.(*Worker).analyzeFile(0xc000367d40, 0xc0022c1000, 0x30, 0xc001900c00, 0xb76, 0xb76, 0xc002277b90, 0x0, 0x0, 0x0, ...) C:/projects/noverify-/noverify/src/linter/worker.go:233 +0xc7 github.com/VKCOM/noverify/src/linter.(*Worker).ParseContents(0xc000367d40, 0xc0022c1000, 0x30, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...) C:/projects/noverify-/noverify/src/linter/worker.go:120 +0x77c github.com/VKCOM/noverify/src/linter.(*Worker).doParseFile(0xc000367d40, 0xc0022c1000, 0x30, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...) C:/projects/noverify-/noverify/src/linter/worker.go:208 +0x117 github.com/VKCOM/noverify/src/linter.ParseFilenames.func3(0xc001d0a701, 0x0, 0xc001d0a780, 0xc001d0a7e0, 0xc0021ceed0, 0x4) C:/projects/noverify-/noverify/src/linter/parser.go:116 +0x207 created by github.com/VKCOM/noverify/src/linter.ParseFilenames C:/projects/noverify-/noverify/src/linter/parser.go:106 +0x22e
No panic. Calmness.
Fixed by #900
Code Example
From here.
Actual Behavior
Panic.
Expected Behavior
No panic. Calmness.