Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • G go
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • go
  • Repository

Switch branch/tag
  • go
  • test
  • switch5.go
Find file BlameHistoryPermalink
  • Josh Bleecher Snyder's avatar
    cmd/compile: use a map to detect duplicate type switch cases · bd2838be
    Josh Bleecher Snyder authored Jun 01, 2016
    This is a bit simpler than playing sorting games,
    and it is clearer that it generates errors
    in the correct (source) order.
    
    It also allows us to simplify sorting.
    
    It also prevents quadratic error messages for
    (pathological) inputs with many duplicate type cases.
    
    While we’re here, refactoring deduping into separate functions.
    
    Negligible compilebench impact.
    
    Fixes #15912.
    
    Change-Id: I6cc19edd38875389a70ccbdbdf0d9b7d5ac5946f
    Reviewed-on: https://go-review.googlesource.com/26762
    
    
    Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
    Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
    bd2838be

Replace switch5.go

Attach a file by drag & drop or click to upload


Cancel
GitLab will create a branch in your fork and start a merge request.
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7