1. 07 Jul, 2009 34 commits
  2. 06 Jul, 2009 6 commits
    • Russ Cox's avatar
      more precise error message · 53ebd163
      Russ Cox authored
      package main
      
      func main() {
             var x interface {} = 42;
             switch x := x.(type) {
             case int:
             case foo:
             }
      }
      
      before:
      x.go:7: non-type case in type switch
      x.go:7: inappropriate case for a type switch
      
      now:
      x.go:7: foo: undefined
      
      R=ken
      OCL=31221
      CL=31221
      53ebd163
    • Russ Cox's avatar
      new reflect type.go implementation · a7b4e9f0
      Russ Cox authored
      R=r
      DELTA=179  (172 added, 6 deleted, 1 changed)
      OCL=31215
      CL=31220
      a7b4e9f0
    • Russ Cox's avatar
      better error message + line numbers · 769919c4
      Russ Cox authored
      package main
      func main() {
             var x interface{};
             switch x {
             case 41:
             case "b":
             }
      }
      
      before:
      x.go:5: fatal error: exprcmp
      
      now:
      x.go:5: illegal types for operand: EQ
      	interface { }
      	int
      x.go:6: illegal types for operand: EQ
      	interface { }
      	string
      
      R=ken
      OCL=31217
      CL=31219
      769919c4
    • Russ Cox's avatar
      new reflect library data structures and code declarations · 4793400b
      Russ Cox authored
        * use structs instead of interfaces
        * compiler lays out data structures ahead of time,
          so no more parsing of strings.
        * unified reflect data structures with interface
          runtime data structures.
        * richer data structures should enable reflection
          on chans and maps, but not implemented here.
      
      R=r,iant
      DELTA=1179  (1179 added, 0 deleted, 0 changed)
      OCL=31107
      CL=31213
      4793400b
    • Rob Pike's avatar
      a few edits and simplifications. · eaf6a344
      Rob Pike authored
      R=rsc
      DELTA=248  (40 added, 108 deleted, 100 changed)
      OCL=31211
      CL=31211
      eaf6a344
    • Robert Griesemer's avatar
      - bug fix: do not strip lower-case parameter and result names in signatures · 4f40f5ea
      Robert Griesemer authored
      - display: show '...' if a struct/interface has fields/methods removed; show
        struct/interface w/o {}'s if all fields/methods were removed; and show the
        {}'s if the struct/interface was empty to begin with
      
      R=rsc
      DELTA=41  (36 added, 0 deleted, 5 changed)
      OCL=31201
      CL=31204
      4f40f5ea