aboutsummaryrefslogtreecommitdiffhomepage
path: root/testdata/errors/compiler.go
blob: 88559103fa8123882a523a8215410665a9f061dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package main

//go:wasmimport foo bar
func foo() {
}

//go:align 7
var global int

// Test for https://github.com/tinygo-org/tinygo/issues/4486
type genericType[T any] struct{}

func (genericType[T]) methodWithoutBody()

func callMethodWithoutBody() {
	msg := &genericType[int]{}
	msg.methodWithoutBody()
}

// ERROR: # command-line-arguments
// ERROR: compiler.go:4:6: can only use //go:wasmimport on declarations
// ERROR: compiler.go:8:5: global variable alignment must be a positive power of two
// ERROR: compiler.go:13:23: missing function body