Skip to content

Commit

Permalink
Updates release notes for PR #4005
Browse files Browse the repository at this point in the history
  • Loading branch information
ponylang-main committed Feb 15, 2022
1 parent f81cde7 commit c575186
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
12 changes: 0 additions & 12 deletions .release-notes/fix-3655.md

This file was deleted.

13 changes: 13 additions & 0 deletions .release-notes/next-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,16 @@ actor Main

Field initialization is now done in a later pass after exhaustiveness checking has been done.

## Fix compiler crash related to using tuples as a generic constraint

Tuple types aren't legal constraints on generics in Pony and we have a check in an early compiler pass to detect and report that error. However, it was previously possible to "sneak" a tuple type as a generic constraint past the earlier check in the compiler by "smuggling" it in a type alias.

The type aliases aren't flattened into their various components until after the code that disallows tuples as generic constraints which would result in the following code causing ponyc to assert:

```ponyc
type Blocksize is (U8, U32)
class Block[T: Blocksize]
```

We've added an additional check to the compiler in a later pass to report an error on the "smuggled" tuple type as a constraint.

0 comments on commit c575186

Please sign in to comment.