From 0ed67cff1b8b6fa93b34022bc3f5b82a0c6357ca Mon Sep 17 00:00:00 2001 From: Mattia Giambirtone Date: Mon, 28 Nov 2022 18:27:04 +0100 Subject: [PATCH] Minor update to generics2 test --- tests/generics2.pn | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/generics2.pn b/tests/generics2.pn index c8364bf..0b9f660 100644 --- a/tests/generics2.pn +++ b/tests/generics2.pn @@ -5,9 +5,8 @@ fn identity(x: int32): int32 { } +# No call is necessary for the compiler to detect the error: +# generics are type checked at declaration time! fn nope[T: int32 | int16](x: T) { return identity(x); } - - -nope(5'i16);