Skip to content

Commit

Permalink
use any as mangling for struct and interface
Browse files Browse the repository at this point in the history
  • Loading branch information
douyixuan committed Oct 11, 2024
1 parent 76ad7fe commit a30b761
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion compiler/compiler/types/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type Interface struct {
}

func (i Interface) Name() string {
return fmt.Sprintf("interface(%s)", i.SourceName)
return fmt.Sprintf("Any")
}

// SortedRequiredMethods returns a sorted slice of all method names
Expand Down
2 changes: 1 addition & 1 deletion compiler/compiler/types/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func (s Struct) LLVM() types.Type {
}

func (s Struct) Name() string {
return fmt.Sprintf("struct(%s)", s.SourceName)
return fmt.Sprintf("Any")
}

func (s Struct) Zero(block *ir.Block, alloca llvmValue.Value) {
Expand Down

0 comments on commit a30b761

Please sign in to comment.