Permalink
Switch branches/tags
weekly.2012-03-27 weekly.2012-03-22 weekly.2012-03-13 weekly.2012-03-04 weekly.2012-02-22 weekly.2012-02-14 weekly.2012-02-07 weekly.2012-01-27 weekly.2012-01-20 weekly.2012-01-15 weekly.2011-12-22 weekly.2011-12-14 weekly.2011-12-06 weekly.2011-12-02 weekly.2011-12-01 weekly.2011-11-18 weekly.2011-11-09 weekly.2011-11-08 weekly.2011-11-02 weekly.2011-11-01 weekly.2011-10-26 weekly.2011-10-25 weekly.2011-10-18 weekly.2011-10-06 weekly.2011-09-21 weekly.2011-09-16 weekly.2011-09-07 weekly.2011-09-01 weekly.2011-08-17 weekly.2011-08-10 weekly.2011-07-29 weekly.2011-07-19 weekly.2011-07-07 weekly.2011-06-23 weekly.2011-06-16 weekly.2011-06-09 weekly.2011-06-02 weekly.2011-05-22 weekly.2011-04-27 weekly.2011-04-13 weekly.2011-04-04 weekly.2011-03-28 weekly.2011-03-15 weekly.2011-03-07.1 weekly.2011-03-07 weekly.2011-02-24 weekly.2011-02-15 weekly.2011-02-01.1 weekly.2011-02-01 weekly.2011-01-20 weekly.2011-01-19 weekly.2011-01-12 weekly.2011-01-06 weekly.2010-12-22 weekly.2010-12-15.1 weekly.2010-12-15 weekly.2010-12-08 weekly.2010-12-02 weekly.2010-11-23 weekly.2010-11-10 weekly.2010-11-02 weekly.2010-10-27 weekly.2010-10-20 weekly.2010-10-13.1 weekly.2010-10-13 weekly.2010-09-29 weekly.2010-09-22 weekly.2010-09-15 weekly.2010-09-06 weekly.2010-08-25 weekly.2010-08-11 weekly.2010-08-04 weekly.2010-07-29 weekly.2010-07-14 weekly.2010-07-01 weekly.2010-06-21 weekly.2010-06-09 weekly.2010-05-27 weekly.2010-05-04 weekly.2010-04-27 weekly.2010-04-13 weekly.2010-03-30 weekly.2010-03-22 weekly.2010-03-15 weekly.2010-03-04 weekly.2010-02-23 weekly.2010-02-17 weekly.2010-02-04 weekly.2010-01-27 weekly.2010-01-13 weekly.2010-01-05 weekly.2009-12-22 weekly.2009-12-09 weekly.2009-12-07 weekly.2009-11-17 weekly.2009-11-12 weekly.2009-11-10.1 weekly.2009-11-10 weekly.2009-11-06 weekly
Nothing to show
Commits on Oct 12, 2018
  1. go/types: remove a test case and update comment

    griesemer committed Oct 11, 2018
    The original need for the extra test case and issue was eliminated
    by https://golang.org/cl/116815 which introduced systematic cycle
    detection. Now that we correctly report the cycle, we can't say much
    about the invalid cast anyway (the type is invalid due to the cycle).
    
    A more sophisticated approach would be able to tell the size of
    a function type independent of the details of that type, but the
    type-checker is not set up for this kind of lazy type-checking.
    
    Fixes #23127.
    
    Change-Id: Ia8479e66baf630ce96f6f36770c8e1c810c59ddc
    Reviewed-on: https://go-review.googlesource.com/c/141640
    Run-TryBot: Robert Griesemer <gri@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Alan Donovan <adonovan@google.com>
Commits on Oct 11, 2018
  1. go/scanner: don't return token.INVALID for ".." sequence

    griesemer committed Oct 10, 2018
    Per the spec, "...the next token is the longest sequence of characters
    that form a valid token." Thus, encountering a ".." sequence should
    return two token.PERIOD tokens rather than a single token.ILLEGAL.
    
    Fixes #28112.
    
    Change-Id: Iba5da841f40036e53f48f9be23f933f362e67f5e
    Reviewed-on: https://go-review.googlesource.com/c/141337
    Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
  2. go/types: use correct receiver types for embedded interface methods

    griesemer committed Oct 11, 2018
    Interface methods don't declare a receiver (it's implicit), but after
    type-checking the respective *types.Func objects are marked as methods
    by having a receiver. For interface methods, the receiver base type used
    to be the interface that declared the method in the first place, even if
    the method also appeared in other interfaces via embedding. A change in
    the computation of method sets for interfaces for Go1.10 changed that
    inadvertently, with the consequence that sometimes a method's receiver
    type ended up being an interface into which the method was embedded.
    The exact behavior also depended on file type-checking order, and because
    files are sometimes sorted by name, the behavior depended on file names.
    
    This didn't matter for type-checking (the typechecker doesn't need the
    receiver), but it matters for clients, and for printing of methods.
    
    This change fixes interface method receivers at the end of type-checking
    when we have all relevant information.
    
    Fixes #28005.
    
    Change-Id: I96c120fb0e517d7f8a14b8530f0273674569d5ea
    Reviewed-on: https://go-review.googlesource.com/c/141358
    Reviewed-by: Alan Donovan <adonovan@google.com>
Commits on Oct 8, 2018
  1. spec: distinguish between explicit and implicit conversions (clarific…

    griesemer committed Oct 2, 2018
    …ation)
    
    The spec used the term "conversion" somewhat indiscriminately for
    explicit conversions that appear literally in the source, and implicit
    conversions that are implied by the context of an expression.
    Be clearer about it by defining the terms.
    
    Also, state that integer to string conversions of the form string(x)
    are never implicit. This clarifies situations where implicit conversions
    might require an integer to change to a string (but don't and never have
    done so). See line 3948.
    
    Fixes #26313.
    
    Change-Id: I8939466df6b5950933ae7c987662ef9f88827fda
    Reviewed-on: https://go-review.googlesource.com/c/139099
    Reviewed-by: Rob Pike <r@golang.org>
    Reviewed-by: Ian Lance Taylor <iant@golang.org>
Commits on Oct 5, 2018
  1. go/types: remove a TODO, enable a test

    griesemer committed Oct 5, 2018
    1) Scopes do have a comment field for documentation (debugging output).
       No need to do anything extra.
    
    2) The testcase in expr3.src has ok error messages. Enabled.
    
    Change-Id: Ic1a03bfec0a6a70d876aa6cfb936973abe58fe6c
    Reviewed-on: https://go-review.googlesource.com/c/139902
    Reviewed-by: Alan Donovan <adonovan@google.com>
  2. go/types: remove work-around for issue #26390

    griesemer committed Oct 5, 2018
    This work-around is not needed anymore now that method
    signatures are type-checked separately from their receiver
    base types: no artificial cycles are introduced anymore
    and so there is no need to artificially cut them.
    
    Fixes #26854.
    
    Change-Id: I2ef15ceeaa0b486f65f6cdc466d0cf06246c74d7
    Reviewed-on: https://go-review.googlesource.com/c/139900
    Reviewed-by: Alan Donovan <adonovan@google.com>
  3. go/types: remove work-around for issue #26124

    griesemer committed Oct 4, 2018
    This work-around is not needed anymore now that method
    signatures are type-checked separately from their receiver
    base types: no artificial cycles are introduced anymore
    and so there is no need to artificially cut them.
    
    Updates #26124.
    
    Change-Id: I9d50171f12dd8977116a5d3f63ac39a06b1cd492
    Reviewed-on: https://go-review.googlesource.com/c/139899
    Reviewed-by: Alan Donovan <adonovan@google.com>
  4. go/types: don't type-check method signatures eagerly anymore

    griesemer committed Oct 4, 2018
    As a side-effect we also get slightly clearer errors for some
    pathological cyclic method declarations.
    
    Fixes #23203.
    Updates #26854.
    
    Change-Id: I30bd6634ac6be26d3f4ef8c7b32e5c1bf76987dd
    Reviewed-on: https://go-review.googlesource.com/c/139897
    Reviewed-by: Alan Donovan <adonovan@google.com>
  5. go/types: prepare for delayed type-checking of methods to when they a…

    griesemer committed Oct 4, 2018
    …re used
    
    Remove assumption that methods associated to concrete (non-interface)
    types have a fully set up signature. Such methods are found through
    LookupFieldOrMethod or lookupMethod, or indexed method access from
    a Named type. Make sure that the method's signature is type-checked
    before use in those cases.
    
    (MethodSets also hold methods but the type checker is not using
    them but for internal verification. API clients will be using it
    after all methods have been type-checked.)
    
    Some functions such as MissingMethod may now have to type-check a
    method and for that they need a *Checker. Add helper functions as
    necessary to provide the additional (receiver) parameter but permit
    it to be nil if the respective functions are invoked through the API
    (at which point we know that all methods have a proper signature and
    thus we don't need the delayed type-check).
    
    Since all package-level objects eventually are type-checked through
    the top-level loop in Checker.packageObjects we are guaranteed that
    all methods will be type-checked as well.
    
    Updates #23203.
    Updates #26854.
    
    Change-Id: I6e48f0016cefd498aa70b776e84a48215a9042c5
    Reviewed-on: https://go-review.googlesource.com/c/139425
    Reviewed-by: Alan Donovan <adonovan@google.com>
  6. go/types: fix recvPtr helper (follow-up on https://golang.org/cl/139422)

    griesemer committed Oct 4, 2018
    The prior CL prepared go/types for the situation where methods might
    not have a type-checked signature when being looked up. The respective
    adjustments to recvPtr were not correct (but because so far method
    signatures are type-checked in time, the bug didn't manifest itself).
    
    Updates #23203.
    Updates #26854.
    
    Change-Id: I796691d11e6aac84396bdef802ad30715755fcc6
    Reviewed-on: https://go-review.googlesource.com/c/139721
    Reviewed-by: Alan Donovan <adonovan@google.com>
Commits on Oct 4, 2018
  1. go/types: determine hasPtrRecv property from source rather than type

    griesemer committed Oct 3, 2018
    LookupFieldOrMethod needs to know if a method receiver is a pointer
    type. Until now this was computed from the the method signature's
    receiver, which required the method signature to be type-checked.
    Furthermore, it required the receiver to be set before the method
    signature was fully type-checked in some cases (see issue #6638).
    
    This CL remembers this property during object resolution, when we
    know it from the source.
    
    With this CL, method signatures don't need to be type-checked before
    they can be looked up; this is a first step towards separating
    type checking of types and type-checking of associated methods.
    
    Updates #23203.
    Updates #26854.
    
    Change-Id: Ie3eb7976e8fe8176ea1b284fa7471a4b7000f80b
    Reviewed-on: https://go-review.googlesource.com/c/139422
    Run-TryBot: Robert Griesemer <gri@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Alan Donovan <adonovan@google.com>
Commits on Oct 2, 2018
  1. cmd/compile: update fmt_test (fix build for long-running tests)

    griesemer committed Oct 2, 2018
    Follow-up on https://golang.org/cl/136397.
    
    Change-Id: Ib0df690847c7c92d8de406dadc16a10507bfda39
    Reviewed-on: https://go-review.googlesource.com/c/139059
    Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
    Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
Commits on Oct 1, 2018
  1. cmd/compile/internal/gc: add alternative node dumper for debugging

    griesemer committed Sep 19, 2018
    dump/fdump is a reflection-based data structure dumper slightly
    customized for the compiler's Node data structure. It dumps the
    transitivle closure of Node (and other) data structures using a
    recursive descent depth first traversal and permits filtering
    options (recursion depth limitation, filtering of struct fields).
    
    I have been using it to diagnose compiler bugs and found it more
    useful than the existing node printing code in some cases because
    field filtering reduces the output to the interesting parts.
    
    No impact on rest of compiler if functions are not called (which
    they only should during a debugging session).
    
    Change-Id: I79d7227f10dd78dbd4bbcdf204db236102fc97a7
    Reviewed-on: https://go-review.googlesource.com/136397
    Reviewed-by: Alan Donovan <adonovan@google.com>
Commits on Sep 27, 2018
  1. go/internal/gccgo: remove unused test file

    griesemer committed Sep 27, 2018
    Follow-up on https://go-review.googlesource.com/c/go/+/137857/4
    which didn't remove this test file after it was removed from the
    list of importer tests in importer_test.go.
    
    Change-Id: Ib89cb3a6d976115da42c33443529ea27bd1ce838
    Reviewed-on: https://go-review.googlesource.com/137975
    Run-TryBot: Robert Griesemer <gri@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Ian Lance Taylor <iant@golang.org>
  2. go/internal/gccgoimporter: use a slice instead of a map for type map …

    griesemer committed Sep 26, 2018
    …(optimization)
    
    ggcgo's export format numbers types consecutively, starting at 1.
    This makes it trivially possible to use a slice (list) instead of
    map for the internal types map.
    
    Change-Id: Ib7814d7fabffac0ad2b56f04a5dad7d6d4c4dd0e
    Reviewed-on: https://go-review.googlesource.com/137935
    Run-TryBot: Robert Griesemer <gri@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Ian Lance Taylor <iant@golang.org>
  3. go/internal/gccgoimporter: fix updating of "forward declared" types

    griesemer committed Sep 25, 2018
    The existing code uses a type map which associates a type number
    with a type; references to existing types are expressed via the
    type number in the export data.
    
    Before this CL, type map entries were set when a type was read
    in completely, which meant that recursive references to types
    (i.e., type map entries) that were in the middle of construction
    (i.e., where the type map was not yet updated) would lead to nil
    types. Such cycles are usually created via defined types which
    introduce a types.Named entry into the type map before the underlying
    type is parsed; in this case the code worked. In case of type aliases,
    no such "forwarder" exists and type cycles lead to nil types.
    
    This CL fixes the problem by a) updating the type map as soon as
    a type becomes available but before the type's components are parsed;
    b) keeping track of a list of type map entries that may need to be
    updated together (because of aliases that may all refer to the same
    type); and c) adding (redundant) markers to the type map to detect
    algorithmic errors.
    
    Also:
    - distinguish between parseInt and parseInt64
    - added more test cases
    
    Fixes #27856.
    
    Change-Id: Iba701439ea3231aa435b7b80ea2d419db2af3be1
    Reviewed-on: https://go-review.googlesource.com/137857
    Run-TryBot: Robert Griesemer <gri@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Ian Lance Taylor <iant@golang.org>
Commits on Sep 24, 2018
  1. spec: be more precise about the moment deferred functions are executed

    griesemer committed Sep 22, 2018
    Fixes #27802.
    
    Change-Id: I7ea9f7279300a55b0cb851893edc591a6f84e324
    Reviewed-on: https://go-review.googlesource.com/136758
    Reviewed-by: Rob Pike <r@golang.org>
    Reviewed-by: Ian Lance Taylor <iant@golang.org>
Commits on Sep 20, 2018
  1. cmd/compile/internal/gc: fix Node.copy and introduce (raw|sep)copy

    griesemer committed Sep 20, 2018
    Node.copy used to make a shallow copy of a node. Often, this is not
    correct: If a node n's Orig field pointed to itself, the copy's Orig
    field has to be adjusted to point to the copy. Otherwise, if n is
    modified later, the copy's Orig appears modified as well (because it
    points to n).
    
    This was fixed for one specific case with
    https://go-review.googlesource.com/c/go/+/136395 (issue #26855).
    
    This change instead addresses copy in general:
    
    In two cases we don't want the Orig adjustment as it causes escape
    analysis output to fail (not match the existing error messages).
    rawcopy is used in those cases.
    
    In several cases Orig is set to the copy immediately after making
    a copy; a new function sepcopy is used there.
    
    Updates #26855.
    Fixes #27765.
    
    Change-Id: Idaadeb5c4b9a027daabd46a2361348f7a93f2b00
    Reviewed-on: https://go-review.googlesource.com/136540
    Reviewed-by: Matthew Dempsky <mdempsky@google.com>
  2. cmd/compile/internal/gc: minor code reorg (cleanup)

    griesemer committed Sep 19, 2018
    Found while tracking down #26855.
    
    Change-Id: Ice137fe390820ba351e1c7439b6a9a1b3bdc966b
    Reviewed-on: https://go-review.googlesource.com/136396
    Run-TryBot: Robert Griesemer <gri@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Matthew Dempsky <mdempsky@google.com>
  3. cmd/compile: fix error message for &T{} literal mismatch

    griesemer committed Sep 19, 2018
    See the change and comment in typecheck.go for a detailed explanation.
    
    Fixes #26855.
    
    Change-Id: I7867f948490fc0873b1bd849048cda6acbc36e76
    Reviewed-on: https://go-review.googlesource.com/136395
    Reviewed-by: Matthew Dempsky <mdempsky@google.com>
  4. cmd/compile/internal/gc: better names for (b|c|f)conf (cleanup)

    griesemer committed Sep 19, 2018
    Use String and GoString methods instead of the xconf names
    for the numeric conversion routines.
    
    Also, fixed a couple of comments in fmt.go.
    
    Change-Id: I1b8acdd95dbff3fc30273070fbb1ac4860031a3c
    Reviewed-on: https://go-review.googlesource.com/136197
    Reviewed-by: Matthew Dempsky <mdempsky@google.com>
  5. cmd/compiler/internal/gc: remove flag from bconv (cleanup)

    griesemer committed Sep 19, 2018
    Change-Id: I863eb8ef491e1d51b83d8dd3061bf11cbdc74a3e
    Reviewed-on: https://go-review.googlesource.com/136196
    Reviewed-by: Matthew Dempsky <mdempsky@google.com>
  6. cmd/compiler/internal/gc: remove flag argument from fconv (cleanup)

    griesemer committed Sep 19, 2018
    The fconv flag arguments were 0, FmtSharp, and FmtSharp|FmtSign.
    The 0 value was used for binary representation only, which was
    readily available via Mpflt.String. Otherwise, FmtSharp was always
    passed. FmtSign was used to print the '+' sign in case of a positive
    number and only needed for complex number formatting. Instead
    implemented cconv and handled it there.
    
    Change-Id: I1f77282f995be9cfda05efb71a0e027836a9da26
    Reviewed-on: https://go-review.googlesource.com/136195
    Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Commits on Sep 17, 2018
  1. go/types: don't report cycle error if clearer error follows

    griesemer committed Sep 17, 2018
    If a cyclic declaration uses a non-type object where it expects
    a type, don't report the cycle error in favor of the clearer and
    more informative error about the missing type.
    
    Fixes #25790.
    
    Change-Id: If937078383def878efb4c69686e5b4b2a495fd5d
    Reviewed-on: https://go-review.googlesource.com/135700
    Reviewed-by: Alan Donovan <adonovan@google.com>
  2. go/types: simplify some internal code

    griesemer committed Sep 17, 2018
    Change-Id: Ia32d40cc272cb049c0a7c9d5f8ef4329bdefc7fe
    Reviewed-on: https://go-review.googlesource.com/135699
    Run-TryBot: Robert Griesemer <gri@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Alan Donovan <adonovan@google.com>
  3. go/types: fix a couple of internal comments

    griesemer committed Sep 17, 2018
    Change-Id: If0e8fbb05c09ee7c64e1aa6b0aa2ade35a70df8a
    Reviewed-on: https://go-review.googlesource.com/135696
    Reviewed-by: Alan Donovan <adonovan@google.com>
Commits on Sep 13, 2018
  1. go/types: be more precise in API comment

    griesemer committed Sep 13, 2018
    Change-Id: I24c4b08091bf3b8734f5dcdb9eac1a3582a4daa8
    Reviewed-on: https://go-review.googlesource.com/135116
    Reviewed-by: Alan Donovan <adonovan@google.com>
  2. go/types: fix scope printing (debugging support)

    griesemer committed Sep 12, 2018
    Printing of scopes was horribly wrong: If a scope contained
    no object declarations, it would abort printing even if the
    scope had children scopes. Also, the line breaks were not
    inserted consistently. The actual test case (ExampleScope)
    was incorrect as well.
    
    Fixed and simplified printing, and adjusted example which
    tests the printing output.
    
    Change-Id: If21c1d4ad71b15a517d4a54da16de5e6228eb4b5
    Reviewed-on: https://go-review.googlesource.com/135115
    Run-TryBot: Robert Griesemer <gri@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Alan Donovan <adonovan@google.com>
  3. cmd/vet: avoid internal error for implicitly declared type switch vars

    griesemer committed Sep 13, 2018
    For type switches using a short variable declaration of the form
    
       switch t := x.(type) {
       case T1:
       ...
    
    go/types doesn't declare the symbolic variable (t in this example)
    with the switch; thus such variables are not found in types.Info.Defs.
    
    Instead they are implicitly declared with each type switch case,
    and can be found in types.Info.Implicits.
    
    Adjust the shadowing code accordingly.
    
    Added a test case to verify that the issue is fixed, and a test
    case verifying that the shadowing code now considers implicitly
    declared variables introduces in type switch cases.
    
    While at it, also fixed the (internal) error reporting to provide
    more accurate information.
    
    Fixe #26725.
    
    Change-Id: If408ed9e692bf47c640f81de8f46bf5eb43415b0
    Reviewed-on: https://go-review.googlesource.com/135117
    Run-TryBot: Robert Griesemer <gri@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
    Reviewed-by: Alan Donovan <adonovan@google.com>
Commits on Sep 5, 2018
  1. go/types: fix internal comments and add additional test case

    griesemer committed Sep 5, 2018
    https://go-review.googlesource.com/c/go/+/132355 addressed
    a crash and inadvertently fixed #27346; however the comment
    added to the type-checker was incorrect and misleading.
    
    This CL fixes the comment, and adds a test case for #27346.
    
    Fixes #27346.
    Updates #22467.
    
    Change-Id: Ib6d5caedf302fd42929c4dacc55e973c1aebfe85
    Reviewed-on: https://go-review.googlesource.com/133415
    Run-TryBot: Robert Griesemer <gri@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Commits on Aug 30, 2018
  1. go/types: better names for internal helper functions (cleanup)

    griesemer committed Aug 21, 2018
    Internal helper functions for type-checking type expressions were
    renamed to make it clearer when they should be used:
    
    	typExpr (w/o def) -> typ
    	typExpr (w/  def) -> definedType
    	typ               -> indirectType
    	typExprInternal   -> typInternal
    
    The rename emphasizes that in most cases Checker.typ should be used
    to compute the types.Type from an ast.Type. If the type is defined,
    definedType should be used. For composite type elements which are
    not "inlined" in memory, indirectType should be used.
    
    In the process, implicitly changed several uses of indirectType
    (old: typ) to typ (old: typExpr) by not changing the respective
    function call source. These implicit changes are ok in those
    places because either call is fine where we are not concerned
    about composite type elements. But using typ (old: typExpr) is
    more efficient than using indirectType (old: typ).
    
    Change-Id: I4ad14d5357c5f94b6f1c33173de575c4cd05c703
    Reviewed-on: https://go-review.googlesource.com/130595
    Reviewed-by: Alan Donovan <adonovan@google.com>
  2. go/types: remove explicit path parameter from most type-checker funct…

    griesemer committed Aug 21, 2018
    …ions (cleanup)
    
    Now that most of the type-checker is using the object-coloring mechanism
    to detect cycles, remove the explicit path parameter from the functions
    that don't rely on it anymore.
    
    Some of the syntactic-based resolver code (for aliases, interfaces)
    still use an explicit path; leaving those unchanged for now.
    
    The function cycle was moved from typexpr.go (where it is not used
    anymore) to resolver.go (where it's still used). It has not changed.
    
    Fixes #25773.
    
    Change-Id: I2100adc8d66d5da9de9277dee94a1f08e5a88487
    Reviewed-on: https://go-review.googlesource.com/130476
    Reviewed-by: Alan Donovan <adonovan@google.com>
  3. go/types: track local cycles using same mechanism as for global objects

    griesemer committed Aug 21, 2018
    For Go 1.11, cycle tracking of global (package-level) objects was changed
    to use a Checker-level object path rather than relying on the explicit
    path parameter that is passed around to some (but not all) type-checker
    functions.
    
    This change now uses the same mechanism for the detection of local
    type cycles (local non-type objects cannot create cycles by definition
    of the spec).
    
    As a result, local alias cycles are now correctly detected as well
    (issue #27106).
    
    The path parameter that is explicitly passed around to some type-checker
    methods is still present and will be removed in a follow-up CL.
    
    Also:
    - removed useCycleMarking flag and respective dead code
    - added a couple more tests
    - improved documentation
    
    Fixes #27106.
    Updates #25773.
    
    Change-Id: I7cbf304bceb43a8d52e6483dcd0fa9ef7e1ea71c
    Reviewed-on: https://go-review.googlesource.com/130455
    Run-TryBot: Robert Griesemer <gri@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Alan Donovan <adonovan@google.com>
Commits on Aug 14, 2018
  1. go/printer: consider empty lines in table layout computation

    griesemer committed Aug 14, 2018
    In previous versions of Go including 1.10, an empty line would break the
    alignment of elements within an expression list.
    
    golang.org/cl/104755 changed the heuristic, with the side effect that
    empty lines no longer broke the table alignment.
    
    A prior fix (https://go-review.googlesource.com/c/go/+/125260, reverted)
    introduced another regression (#26930) which this change doesn't produce.
    
    Added test cases for both #26352 and #26930.
    
    Fixes #26352.
    Updates #26930.
    
    Change-Id: I371f48e6f3620ebbab53f2128ec5e58bcd4a62f1
    Reviewed-on: https://go-review.googlesource.com/129256
    Run-TryBot: Robert Griesemer <gri@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
    Reviewed-by: Alan Donovan <adonovan@google.com>
  2. go/printer: revert "make empty lines break table alignment"

    griesemer committed Aug 14, 2018
    This reverts commit c116265.
    
    The change, while addressing issue #26352, introduced another
    regression (#26930), which is worse. Reverting this change in
    favor of a better fix for the original issue.
    
    Updates #26352.
    Fixes #26930.
    
    Change-Id: I71ad12a8212992cce5c1e73907d1f7460f98d9e8
    Reviewed-on: https://go-review.googlesource.com/129255
    Run-TryBot: Robert Griesemer <gri@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
    Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>