An undefined type detection function has been added to better diagnose incomplete type definitions. Implicit type names in interface or struct declarations are now better handled. The incomplete status is not fowarded to aliased type declarations to handle circular definitions. Fixes #999 and #995. Improves #260 (goes farther, but still fails).
18 lines
157 B
Go
18 lines
157 B
Go
package main
|
|
|
|
import "fmt"
|
|
|
|
type I1 interface{ A }
|
|
|
|
type A = I2
|
|
|
|
type I2 interface{ F() I1 }
|
|
|
|
func main() {
|
|
var i I1
|
|
fmt.Println(i)
|
|
}
|
|
|
|
// Output:
|
|
// <nil>
|