Skip to content

Commit

Permalink
Merge pull request #1582 from onflow/bastian/type-instantiation-test
Browse files Browse the repository at this point in the history
  • Loading branch information
turbolent authored Apr 14, 2022
2 parents a296fab + a50651a commit 477f6ab
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions runtime/tests/checker/genericfunction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -922,3 +922,18 @@ func TestCheckBorrowOfCapabilityWithoutTypeArgument(t *testing.T) {

require.NoError(t, err)
}

func TestCheckUnparameterizedTypeInstantiationE(t *testing.T) {

t.Parallel()

_, err := ParseAndCheckWithPanic(t, `
struct S {}
let s: S<Int> = panic("")
`)

errs := ExpectCheckerErrors(t, err, 1)

assert.IsType(t, &sema.UnparameterizedTypeInstantiationError{}, errs[0])
}

0 comments on commit 477f6ab

Please sign in to comment.