1. 07 Jul, 2009 36 commits
  2. 06 Jul, 2009 4 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