aboutsummaryrefslogtreecommitdiffhomepage
path: root/compiler/symbol.go
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2022-06-11 16:25:34 +0200
committerRon Evans <[email protected]>2022-06-11 20:41:16 +0200
commitbb65c5ce2b92e89940678117900c3e0d8427d371 (patch)
tree8fe1b9a919c2ad4fce56ed16ec3f4f0d639412a8 /compiler/symbol.go
parent283fed16a5c112b1e6682b08ed61552059c90ccc (diff)
downloadtinygo-bb65c5ce2b92e89940678117900c3e0d8427d371.tar.gz
tinygo-bb65c5ce2b92e89940678117900c3e0d8427d371.zip
compiler: add support for type parameters (aka generics)
...that was surprisingly easy.
Diffstat (limited to 'compiler/symbol.go')
-rw-r--r--compiler/symbol.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/symbol.go b/compiler/symbol.go
index fb3b6d43e..03db781e6 100644
--- a/compiler/symbol.go
+++ b/compiler/symbol.go
@@ -191,7 +191,7 @@ func (c *compilerContext) getFunction(fn *ssa.Function) llvm.Value {
// should be created right away.
// The exception is the package initializer, which does appear in the
// *ssa.Package members and so shouldn't be created here.
- if fn.Synthetic != "" && fn.Synthetic != "package initializer" {
+ if fn.Synthetic != "" && fn.Synthetic != "package initializer" && fn.Synthetic != "generic function" {
irbuilder := c.ctx.NewBuilder()
b := newBuilder(c, irbuilder, fn)
b.createFunction()