]> Cypherpunks.ru repositories - gostls13.git/blobdiff - src/go/types/testdata/check/issues.src
[dev.typeparams] all: merge master (4711bf3) into dev.typeparams
[gostls13.git] / src / go / types / testdata / check / issues.src
index b0231548a7cc4b1e954689c670dd852c23416f24..ef1737331d7eeaac110fe8bfde549ac5a8181796 100644 (file)
@@ -6,7 +6,7 @@ package go1_17 // don't permit non-interface elements in interfaces
 
 import (
        "fmt"
-       syn "cmd/compile/internal/syntax"
+       syn "regexp/syntax"
        t1 "text/template"
        t2 "html/template"
 )
@@ -329,10 +329,10 @@ func (... /* ERROR can only use ... with final parameter */ TT) f()
 func issue28281g() (... /* ERROR can only use ... with final parameter */ TT)
 
 // Issue #26234: Make various field/method lookup errors easier to read by matching cmd/compile's output
-func issue26234a(f *syn.File) {
+func issue26234a(f *syn.Prog) {
        // The error message below should refer to the actual package name (syntax)
        // not the local package name (syn).
-       f.foo /* ERROR f\.foo undefined \(type \*syntax\.File has no field or method foo\) */
+       f.foo /* ERROR f\.foo undefined \(type \*syntax\.Prog has no field or method foo\) */
 }
 
 type T struct {
@@ -357,7 +357,7 @@ func issue35895() {
        var _ T = 0 // ERROR cannot use 0 \(untyped int constant\) as T
 
        // There is only one package with name syntax imported, only use the (global) package name in error messages.
-       var _ *syn.File = 0 // ERROR cannot use 0 \(untyped int constant\) as \*syntax.File
+       var _ *syn.Prog = 0 // ERROR cannot use 0 \(untyped int constant\) as \*syntax.Prog
 
        // Because both t1 and t2 have the same global package name (template),
        // qualify packages with full path name in this case.