<pre class="notranslate">What steps will reproduce the problem?
1. go get code.google.com/p/go-tour
2. go vet code.google.com/p/go-tour/prog

What is the expected output?

No panic.

What do you see instead?

INTERNAL PANIC: runtime error: invalid memory address or nil pointer dereference
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
    panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x38 pc=0x4eb38c]

goroutine 1 [running]:
code.google.com/p/go.tools/go/types.func·003()
    /home/u/goget/src/code.google.com/p/go.tools/go/types/check.go:113 +0x16a
code.google.com/p/go.tools/go/types.identicalMethods(0xc2101ed380, 0xc2100cffc0,
0xc2100e0310)
    /home/u/goget/src/code.google.com/p/go.tools/go/types/predicates.go:235 +0x28c
code.google.com/p/go.tools/go/types.IsIdentical(0xc21004f200, 0xc2101bdee8,
0xc21004f200, 0xc2100e0310, 0xc21005a800, ...)
    /home/u/goget/src/code.google.com/p/go.tools/go/types/predicates.go:170 +0x974
code.google.com/p/go.tools/go/types.(*operand).isAssignable(0xc2102138c0, 0xc2100d2480,
0xc21004f240, 0xc2100cff60, 0x41e500, ...)
    /home/u/goget/src/code.google.com/p/go.tools/go/types/operand.go:144 +0x172
code.google.com/p/go.tools/go/types.(*checker).assignment(0xc21005b900, 0xc2102138c0,
0xc21004f240, 0xc2100cff60, 0xc21004f240, ...)
    /home/u/goget/src/code.google.com/p/go.tools/go/types/stmt.go:36 +0x1dd
code.google.com/p/go.tools/go/types.(*checker).argument(0xc21005b900, 0xc2100d0600, 0x0,
0xc21005a740, 0xc210098560, ...)
    /home/u/goget/src/code.google.com/p/go.tools/go/types/expr.go:987 +0x23a
code.google.com/p/go.tools/go/types.(*checker).rawExpr(0xc21005b900, 0xc2102138c0,
0xc21005a900, 0xc21009c080, 0x0, ...)
    /home/u/goget/src/code.google.com/p/go.tools/go/types/expr.go:1603 +0x3c3b
code.google.com/p/go.tools/go/types.(*checker).stmt(0xc21005b900, 0xc21005aa00,
0xc210089d60)
    /home/u/goget/src/code.google.com/p/go.tools/go/types/stmt.go:356 +0x545c
code.google.com/p/go.tools/go/types.(*checker).stmtList(0xc21005b900, 0xc21009c0c0, 0x3,
0x4)
    /home/u/goget/src/code.google.com/p/go.tools/go/types/stmt.go:266 +0x68
code.google.com/p/go.tools/go/types.check(0xc2100d2480, 0x601020, 0x1, 0xc21005a540,
0xc2100ce800, ...)
    /home/u/goget/src/code.google.com/p/go.tools/go/types/check.go:159 +0x431
code.google.com/p/go.tools/go/types.(*Context).Check(0xc2100d2480, 0x601020, 0x1,
0xc21005a540, 0xc2100ce800, ...)
    /home/u/goget/src/code.google.com/p/go.tools/go/types/api.go:142 +0x6c
main.(*Package).check(0xc2100d23c0, 0xc21005a540, 0xc2100ce800, 0x42, 0x80, ...)
    /home/u/goget/src/code.google.com/p/go.tools/cmd/vet/types.go:32 +0x168
main.doPackage(0x601020, 0x1, 0xc21000a010, 0x42, 0x42, ...)
    /home/u/goget/src/code.google.com/p/go.tools/cmd/vet/main.go:226 +0x8f5
main.main()
    /home/u/goget/src/code.google.com/p/go.tools/cmd/vet/main.go:144 +0x665

goroutine 2 [runnable]:
exit status 2

Which compiler are you using (5g, 6g, 8g, gccgo)?
6g

Which operating system are you using?
Linux

Which version are you using?  (run 'go version')
go version devel +4aa7943034c5 Thu Jun 06 18:10:42 2013 -0700 linux/amd64

code.google.com/p/go.tools
changeset: 956fb611bffb

Please provide any additional information below.

The file that causes this panic is:
code.google.com/p/go-tour/prog/interfaces-are-satisfied-implicitly.go

Below is a simplified version that still causes the panic. I'll inline the
example since play.golang.org is almost impossible to access from some parts of
Asia.

package main

import (
    "fmt"
    "os"
)

type Writer interface {
    Write(b []byte) (n int, err error)
}

func main() {
    var w Writer

    // os.Stdout implements Writer
    w = os.Stdout

    fmt.Fprintf(w, "hello, writer\n")
}</pre>
<p dir="auto">by <strong>aaron.blohowiak</strong>:</p>
<pre class="notranslate">What does 'go version' print?

  go version go1.2.1 darwin/amd64
  I checked the source in tip and the problem is also there.

What steps reproduce the problem?
If possible, include a link to a program on play.golang.org.

  <a href="http://play.golang.org/p/4ZbUkex2Wm" rel="nofollow">http://play.golang.org/p/4ZbUkex2Wm</a>

What happened?

  RequestURI() returns a path with many valid characters escaped.

What should have happened instead?

  All sub-delim characters MUST NOT be escaped.

Please provide any additional information below.

  Using the ReverseProxy breaks OAuth signing verification because of url.URL RequestURI()'s incorrect replacement of reserved characters with their encoded counterparts in shouldEncode(). There is a workaround of creating a custom Director that looks at the RequestURI and performs the correct parsing and escaping, populating the req.URL.Opaque and draining the req.URL.Path, but it would be better for the std library to do the right thing. Code that relies on the current escaping behavior is wrong, so I do not believe that fixing this would violate the stability guarantee.

  This violates the http spec: rfc3986 §2.2 Reserved Characters
   
  The purpose of reserved characters is to provide a set of delimiting characters that are distinguishable from other data within a URI. URIs that differ in the replacement of a reserved character with its corresponding percent-encoded octet are not equivalent. Percent-encoding a reserved character, or decoding a percent-encoded octet that corresponds to a reserved character, will change how the URI is interpreted by most applications.  Thus, characters in the reserved set are protected from normalization and are therefore safe to be used by scheme-specific and producer-specific algorithms for delimiting data subcomponents within a URI.</pre>