tinygo/compiler
Michael Teichgräber 7e46c1766d compiler: fix comp. of func calls for func values of a defined type
When compiling a piece of code where a function value is called,
the compiler panics if the function value's type is a defined type,
and not just a type literal (function signature): The type assertion
(*types.Signature) fails, because the type of the func value is a
*types.Named.

This patch fixes this by using the type's underlying type, so that a
types.Named is properly turned into its underlying types.Signature,
before the type assertion takes place.
It takes advantage of the property that all types have an underlying type
(both are the same, if a type is not named).

Fixes #320
2019-05-03 15:41:00 +02:00
..
asserts.go compiler: fix MakeSlice bounds check and casting 2019-04-10 20:21:33 +02:00
calls.go compiler: simplify code around getZeroValue 2019-04-26 08:52:10 +02:00
channel.go compiler: refactor parseExpr 2019-04-26 08:52:10 +02:00
compiler.go compiler: fix comp. of func calls for func values of a defined type 2019-05-03 15:41:00 +02:00
defer.go compiler: mark all GEPs as inbounds 2019-04-26 09:17:52 +02:00
errors.go all: improve compiler error handling 2019-04-26 08:52:10 +02:00
func-lowering.go compiler: lower func values to switch + direct call 2019-04-17 23:12:59 +02:00
func.go compiler: refactor packing of word-sized values in integers 2019-05-01 12:12:30 +02:00
goroutine-lowering.go compiler: mark all GEPs as inbounds 2019-04-26 09:17:52 +02:00
inlineasm.go compiler: refactor parseExpr 2019-04-26 08:52:10 +02:00
interface-lowering.go compiler: avoid bitcast when replacing a method call with a direct call 2019-05-01 12:12:30 +02:00
interface.go compiler: refactor packing of word-sized values in integers 2019-05-01 12:12:30 +02:00
llvm.go all: rename go-llvm to new import path 2019-01-27 19:26:16 +01:00
map.go all: improve compiler error handling 2019-04-26 08:52:10 +02:00
optimizer.go compiler: simplify code around getZeroValue 2019-04-26 08:52:10 +02:00
reflect.go reflect: add limited support for all type kinds 2019-02-05 17:11:09 +01:00
sizes.go cgo: implement C unions 2019-04-17 11:56:40 +02:00
syscall.go compiler: refactor parseExpr 2019-04-26 08:52:10 +02:00
wordpack.go compiler: refactor packing of word-sized values in integers 2019-05-01 12:12:30 +02:00