diff --git a/go-runtime/compile/schema.go b/go-runtime/compile/schema.go index 163865f5e9..3d73f895ea 100644 --- a/go-runtime/compile/schema.go +++ b/go-runtime/compile/schema.go @@ -949,9 +949,8 @@ func maybeVisitTypeEnumVariant(pctx *parseContext, node *ast.GenDecl, directives return } typ := pctx.pkg.TypesInfo.TypeOf(t.Type) - if typeInterface, ok := typ.Underlying().(*types.Interface); ok { + if _, ok := typ.Underlying().(*types.Interface); ok { // Type enums should not count as variants of themselves - pctx.enumInterfaces[t.Name.Name] = typeInterface return } diff --git a/go-runtime/compile/testdata/one/one.go b/go-runtime/compile/testdata/one/one.go index 48dca4ac9b..651bb25c7e 100644 --- a/go-runtime/compile/testdata/one/one.go +++ b/go-runtime/compile/testdata/one/one.go @@ -173,3 +173,13 @@ func Http(ctx context.Context, req builtin.HttpRequest[Req]) (builtin.HttpRespon type DataWithType[T any] struct { Value T } + +type NonFTLInterface interface { + NonFTLInterface() +} + +type NonFTLStruct struct { + Name string +} + +func (NonFTLStruct) NonFTLInterface() {}