mirror of
https://github.com/dolthub/dolt.git
synced 2026-02-05 02:59:44 -06:00
Add friendly message to Chk for Reffer != nil
Now you get told you're holding it wrong when you fail to import the enc package and get the global definition for Reffer.
This commit is contained in:
@@ -9,7 +9,7 @@ type cachedRef ref.Ref
|
||||
|
||||
func (cr *cachedRef) Ref(v Value) ref.Ref {
|
||||
if ref.Ref(*cr) == (ref.Ref{}) {
|
||||
Chk.NotNil(Reffer)
|
||||
Chk.NotNil(Reffer, "Reffer is nil; you probably need to import 'enc'.")
|
||||
*cr = cachedRef(Reffer(v))
|
||||
}
|
||||
return ref.Ref(*cr)
|
||||
|
||||
Reference in New Issue
Block a user