Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions bug_7580.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package main

import (
"testing"

"gorm.io/gorm"
)

func TestCompileError(t *testing.T) {
dbg := DB.Session(&gorm.Session{DryRun: true})
db := gorm.G[gorm.Model](dbg)

var _ gorm.ChainInterface[gorm.Model] = db

Check failure on line 13 in bug_7580.go

View workflow job for this annotation

GitHub Actions / sqlite (1.24, ubuntu-latest)

cannot use db (variable of interface type gorm.Interface[gorm.Model]) as gorm.ChainInterface[gorm.Model] value in variable declaration: gorm.Interface[gorm.Model] does not implement gorm.ChainInterface[gorm.Model] (missing method Count)
var _ gorm.Interface[gorm.Model] = db
}
Loading