Commit bd7b193
go/types, types2: adjust Checker.recordCommaOkTypes signature
By changing the signature to accept a slice rather than an
array, we can avoid creating the array in the first place.
Functionally, we now also record comma-ok types if the
corresponding assignment was incorrect. But this change
provides more (not less) information through the API and
only so if the program is incorrect in the first place.
Change-Id: I0d629441f2f890a37912171fb26ef0e75827ce23
Reviewed-on: https://go-review.googlesource.com/c/go/+/478218
Auto-Submit: Robert Griesemer <[email protected]>
Run-TryBot: Robert Griesemer <[email protected]>
Reviewed-by: Robert Findley <[email protected]>
Reviewed-by: Robert Griesemer <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>1 parent 0ed364a commit bd7b193
File tree
4 files changed
+33
-32
lines changed- src
- cmd/compile/internal/types2
- go/types
4 files changed
+33
-32
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
381 | 379 | | |
382 | 380 | | |
383 | 381 | | |
| |||
412 | 410 | | |
413 | 411 | | |
414 | 412 | | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
420 | 416 | | |
421 | 417 | | |
422 | 418 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
504 | 504 | | |
505 | 505 | | |
506 | 506 | | |
507 | | - | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
508 | 510 | | |
509 | | - | |
| 511 | + | |
| 512 | + | |
510 | 513 | | |
511 | 514 | | |
512 | | - | |
| 515 | + | |
| 516 | + | |
513 | 517 | | |
514 | 518 | | |
515 | 519 | | |
516 | 520 | | |
517 | 521 | | |
518 | 522 | | |
519 | | - | |
520 | | - | |
| 523 | + | |
| 524 | + | |
521 | 525 | | |
522 | 526 | | |
| 527 | + | |
523 | 528 | | |
524 | 529 | | |
525 | 530 | | |
| |||
535 | 540 | | |
536 | 541 | | |
537 | 542 | | |
538 | | - | |
539 | | - | |
| 543 | + | |
| 544 | + | |
540 | 545 | | |
541 | 546 | | |
542 | 547 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
373 | 371 | | |
374 | 372 | | |
375 | 373 | | |
| |||
394 | 392 | | |
395 | 393 | | |
396 | 394 | | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
402 | 398 | | |
403 | 399 | | |
404 | 400 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
478 | 478 | | |
479 | 479 | | |
480 | 480 | | |
481 | | - | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
482 | 484 | | |
483 | | - | |
| 485 | + | |
| 486 | + | |
484 | 487 | | |
485 | 488 | | |
486 | | - | |
| 489 | + | |
| 490 | + | |
487 | 491 | | |
488 | 492 | | |
489 | 493 | | |
490 | 494 | | |
491 | 495 | | |
492 | 496 | | |
493 | | - | |
494 | | - | |
| 497 | + | |
| 498 | + | |
495 | 499 | | |
496 | 500 | | |
497 | 501 | | |
| |||
0 commit comments