Skip to content

feat: allow field access on concrete types behind interface values#952

Open
snaffi wants to merge 1 commit intoexpr-lang:masterfrom
snaffi:feature/get-embedded-interface-properties
Open

feat: allow field access on concrete types behind interface values#952
snaffi wants to merge 1 commit intoexpr-lang:masterfrom
snaffi:feature/get-embedded-interface-properties

Conversation

@snaffi
Copy link
Copy Markdown

@snaffi snaffi commented Mar 31, 2026

Issue
#951

fk := f.Type.Kind()

// Dereference pointers to get to the underlying type.
for fk == reflect.Ptr {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets use our deref package.

return reflect.Value{}, reflect.StructField{}, false
}

func fetchFromEmbeddedInterfaces(v reflect.Value, fieldName string) (any, bool) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will be nice to test this function in isolation. A better unit tests for this function, ideally with 100% coverage for this function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants