-
Notifications
You must be signed in to change notification settings - Fork 17.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
go/types, types2: unnecessarily incomplete interface in error message #46167
Comments
Change https://golang.org/cl/320150 mentions this issue: |
…interfaces in debug mode only The /* incomplete */ comment printed for interfaces that have not been "completed" yet is not useful for end-users; it's here for type-checker debugging. Rather than trying to pass through a debug flag through all print routines (which may require new exported API), simply don't print the comment unless we have the debug flag set inside the type-checker. For #46167. Change-Id: Ibd22edfe63001dfd2b814eeb94c2d54d35afd88c Reviewed-on: https://go-review.googlesource.com/c/go/+/320150 Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
Change https://golang.org/cl/324731 mentions this issue: |
… mode only This is a straightforward port of CL 320150 to go/types. Fixes #46167 Change-Id: Id1845046f598ac4fefd68cda6a5a03b7a5fc5a4a Reviewed-on: https://go-review.googlesource.com/c/go/+/324731 Trust: Robert Findley <rfindley@google.com> Run-TryBot: Robert Findley <rfindley@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
This was fixed with the above CLs. |
Change https://golang.org/cl/339832 mentions this issue: |
…terfaces (cleanup) TestIncompleteInterfaces is not useful anymore because interface printing always shows the syntactic type structure of an interface. Also remove the respective support code in interface printing and simplify that code. Move the newDefined and nopos support declarations unchanged into api_test.go where they are used. Updates #46167. Change-Id: I23e303bc4ae4271912ba75f201bd2b7cd4a17b3e Reviewed-on: https://go-review.googlesource.com/c/go/+/339832 Trust: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
Before my coffee kicked in this morning, I made the following mistake:
(I typed
var
instead oftype
)I got an error about I not being a type. That's good. However, the specific error message was "I (variable of type interface{f() /* incomplete */}) is not a type".
There's no reason for the type of
I
to be incomplete at this point in the type checking pass, and even if there were we should probably evaluate the error message later when it can be more accurate.CC @griesemer
The text was updated successfully, but these errors were encountered: