Commit 1b3a514b authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 08d8bbf9
...@@ -324,7 +324,10 @@ func RegisterClass(class string, typ, stateType reflect.Type) { ...@@ -324,7 +324,10 @@ func RegisterClass(class string, typ, stateType reflect.Type) {
badf("class must be not empty") badf("class must be not empty")
} }
if zc, already := classTab[class]; already { if zc, already := classTab[class]; already {
badf("class already registered for %q", zc.typ) badf("class already registered for type %q", zc.typ)
}
if zc, already := typeTab[typ]; already {
badf("type already registered for class %q", zc.class)
} }
// typ must embed Persistent // typ must embed Persistent
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment