aboutsummaryrefslogtreecommitdiffhomepage
path: root/compiler
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2024-06-12 13:28:30 +0200
committerRon Evans <[email protected]>2024-06-12 14:46:47 +0200
commit077b35e9ad030d7dcf1c35249378c5fa1608c2df (patch)
tree29ea40e0dac80ce890e743542f94e6f776830d15 /compiler
parent880e9404177bb2dae45a4fead141e96cd4b2024a (diff)
downloadtinygo-077b35e9ad030d7dcf1c35249378c5fa1608c2df.tar.gz
tinygo-077b35e9ad030d7dcf1c35249378c5fa1608c2df.zip
all: drop support for Go 1.18
Go 1.18 has been unsupported for quite a while now (the oldest supported version is Go 1.21). But more importantly, the golang.org/x/tools module now requires Go 1.19 or later. So we'll drop this older version.
Diffstat (limited to 'compiler')
-rw-r--r--compiler/interface.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/interface.go b/compiler/interface.go
index b6dffd643..fc698c7a9 100644
--- a/compiler/interface.go
+++ b/compiler/interface.go
@@ -514,8 +514,7 @@ var basicTypeNames = [...]string{
func getTypeCodeName(t types.Type) (string, bool) {
switch t := t.(type) {
case *types.Named:
- // Note: check for `t.Obj().Pkg() != nil` for Go 1.18 only.
- if t.Obj().Pkg() != nil && t.Obj().Parent() != t.Obj().Pkg().Scope() {
+ if t.Obj().Parent() != t.Obj().Pkg().Scope() {
return "named:" + t.String() + "$local", true
}
return "named:" + t.String(), false