From 8c58b31bbd35c9359f9c59c578ef0b083f583942 Mon Sep 17 00:00:00 2001 From: Christoffer Lerno Date: Thu, 13 Feb 2025 12:53:46 +0100 Subject: [PATCH] Remove <[]> experimental generic syntax. --- lib/std/collections/bitset.c3 | 2 +- lib/std/collections/object.c3 | 6 +-- lib/std/collections/priorityqueue.c3 | 6 +-- lib/std/core/allocators/tracking_allocator.c3 | 2 +- lib/std/core/array.c3 | 2 +- lib/std/hash/md5.c3 | 6 +-- lib/std/hash/sha1.c3 | 6 +-- lib/std/hash/sha256.c3 | 6 +-- lib/std/io/path.c3 | 2 +- lib/std/math/math.c3 | 48 +++++++++---------- lib/std/math/math_vector.c3 | 4 +- lib/std/net/url.c3 | 4 +- lib/std/os/backtrace.c3 | 2 +- lib/std/sort/countingsort.c3 | 6 +-- lib/std/sort/insertionsort.c3 | 4 +- lib/std/sort/quicksort.c3 | 6 +-- releasenotes.md | 1 - resources/examples/contextfree/boolerr.c3 | 8 ++-- src/compiler/parse_expr.c | 26 ++-------- src/compiler/parse_global.c | 15 ++---- src/compiler/parser_internal.h | 2 +- test/test_suite/generic/generic_parsing.c3 | 8 ++-- 22 files changed, 72 insertions(+), 100 deletions(-) diff --git a/lib/std/collections/bitset.c3 b/lib/std/collections/bitset.c3 index e280d256d..6e0619cb0 100644 --- a/lib/std/collections/bitset.c3 +++ b/lib/std/collections/bitset.c3 @@ -75,7 +75,7 @@ import std::collections::list; const BITS = Type.sizeof * 8; -def GrowableBitSetList = List<[Type]>; +def GrowableBitSetList = List(); struct GrowableBitSet { diff --git a/lib/std/collections/object.c3 b/lib/std/collections/object.c3 index b9cb8708a..f14dc87d0 100644 --- a/lib/std/collections/object.c3 +++ b/lib/std/collections/object.c3 @@ -462,7 +462,7 @@ fn Object* Object.get_or_create_obj(&self, String key) return container; } -def ObjectInternalMap = HashMap<[String, Object*]> @private; -def ObjectInternalList = List<[Object*]> @private; -def ObjectInternalMapEntry = Entry<[String, Object*]> @private; +def ObjectInternalMap = HashMap() @private; +def ObjectInternalList = List() @private; +def ObjectInternalMapEntry = Entry() @private; diff --git a/lib/std/collections/priorityqueue.c3 b/lib/std/collections/priorityqueue.c3 index 6550f3cfe..e83a00cb9 100644 --- a/lib/std/collections/priorityqueue.c3 +++ b/lib/std/collections/priorityqueue.c3 @@ -23,13 +23,13 @@ module std::collections::priorityqueue(); import std::collections::priorityqueue::private; -distinct PriorityQueue = inline PrivatePriorityQueue<[Type, false]>; -distinct PriorityQueueMax = inline PrivatePriorityQueue<[Type, true]>; +distinct PriorityQueue = inline PrivatePriorityQueue(); +distinct PriorityQueueMax = inline PrivatePriorityQueue(); module std::collections::priorityqueue::private(); import std::collections::list, std::io; -def Heap = List<[Type]>; +def Heap = List(); struct PrivatePriorityQueue (Printable) { diff --git a/lib/std/core/allocators/tracking_allocator.c3 b/lib/std/core/allocators/tracking_allocator.c3 index a43ea9c7c..b2d5de3bd 100644 --- a/lib/std/core/allocators/tracking_allocator.c3 +++ b/lib/std/core/allocators/tracking_allocator.c3 @@ -13,7 +13,7 @@ struct Allocation void*[MAX_BACKTRACE] backtrace; } -def AllocMap = HashMap<[uptr, Allocation]>; +def AllocMap = HashMap(); // A simple tracking allocator. // It tracks allocations using a hash map but diff --git a/lib/std/core/array.c3 b/lib/std/core/array.c3 index 8631f7b1e..abb808e34 100644 --- a/lib/std/core/array.c3 +++ b/lib/std/core/array.c3 @@ -26,7 +26,7 @@ macro slice2d(array_ptr, x = 0, xlen = 0, y = 0, ylen = 0) if (xlen < 1) xlen = $typeof((*array_ptr)[0]).len + xlen; if (ylen < 1) ylen = $typeof((*array_ptr)).len + ylen; var $ElementType = $typeof((*array_ptr)[0][0]); - return Slice2d<[$ElementType]> { ($ElementType*)array_ptr, $typeof((*array_ptr)[0]).len, y, ylen, x, xlen }; + return Slice2d(<$ElementType>) { ($ElementType*)array_ptr, $typeof((*array_ptr)[0]).len, y, ylen, x, xlen }; } diff --git a/lib/std/hash/md5.c3 b/lib/std/hash/md5.c3 index 74f71479c..4267fab89 100644 --- a/lib/std/hash/md5.c3 +++ b/lib/std/hash/md5.c3 @@ -13,9 +13,9 @@ struct Md5 uint[16] block; } -def HmacMd5 = Hmac<[Md5, HASH_BYTES, BLOCK_BYTES]>; -def hmac = hmac::hash<[Md5, HASH_BYTES, BLOCK_BYTES]>; -def pbkdf2 = hmac::pbkdf2<[Md5, HASH_BYTES, BLOCK_BYTES]>; +def HmacMd5 = Hmac(); +def hmac = hmac::hash(); +def pbkdf2 = hmac::pbkdf2(); fn char[HASH_BYTES] hash(char[] data) { diff --git a/lib/std/hash/sha1.c3 b/lib/std/hash/sha1.c3 index 90486e06b..391061b80 100644 --- a/lib/std/hash/sha1.c3 +++ b/lib/std/hash/sha1.c3 @@ -18,9 +18,9 @@ struct Sha1 char[BLOCK_BYTES] buffer; } -def HmacSha1 = Hmac<[Sha1, HASH_BYTES, BLOCK_BYTES]>; -def hmac = hmac::hash<[Sha1, HASH_BYTES, BLOCK_BYTES]>; -def pbkdf2 = hmac::pbkdf2<[Sha1, HASH_BYTES, BLOCK_BYTES]>; +def HmacSha1 = Hmac(); +def hmac = hmac::hash(); +def pbkdf2 = hmac::pbkdf2(); fn char[HASH_BYTES] hash(char[] data) { diff --git a/lib/std/hash/sha256.c3 b/lib/std/hash/sha256.c3 index acd08c3de..b18200c96 100644 --- a/lib/std/hash/sha256.c3 +++ b/lib/std/hash/sha256.c3 @@ -34,9 +34,9 @@ struct Sha256 char[BLOCK_SIZE] buffer; } -def HmacSha256 = Hmac<[Sha256, HASH_SIZE, BLOCK_SIZE]>; -def hmac = hmac::hash<[Sha256, HASH_SIZE, BLOCK_SIZE]>; -def pbkdf2 = hmac::pbkdf2<[Sha256, HASH_SIZE, BLOCK_SIZE]>; +def HmacSha256 = Hmac(); +def hmac = hmac::hash(); +def pbkdf2 = hmac::pbkdf2(); fn char[HASH_SIZE] hash(char[] data) { diff --git a/lib/std/io/path.c3 b/lib/std/io/path.c3 index aa76d9a3e..ce5af06b4 100644 --- a/lib/std/io/path.c3 +++ b/lib/std/io/path.c3 @@ -7,7 +7,7 @@ const char PREFERRED_SEPARATOR_WIN32 = '\\'; const char PREFERRED_SEPARATOR_POSIX = '/'; const char PREFERRED_SEPARATOR = env::WIN32 ? PREFERRED_SEPARATOR_WIN32 : PREFERRED_SEPARATOR_POSIX; -def PathList = List<[Path]>; +def PathList = List(); fault PathResult { diff --git a/lib/std/math/math.c3 b/lib/std/math/math.c3 index 9410061a8..aa76cefe2 100644 --- a/lib/std/math/math.c3 +++ b/lib/std/math/math.c3 @@ -90,33 +90,33 @@ fault MatrixError MATRIX_INVERSE_DOESNT_EXIST, } -def Complexf = Complex<[float]>; -def Complex = Complex<[double]>; -def COMPLEX_IDENTITY = complex::IDENTITY<[double]>; -def COMPLEXF_IDENTITY = complex::IDENTITY<[float]>; +def Complexf = Complex(); +def Complex = Complex(); +def COMPLEX_IDENTITY = complex::IDENTITY(); +def COMPLEXF_IDENTITY = complex::IDENTITY(); -def Quaternionf = Quaternion<[float]>; -def Quaternion = Quaternion<[double]>; -def QUATERNION_IDENTITY = quaternion::IDENTITY<[double]>; -def QUATERNIONF_IDENTITY = quaternion::IDENTITY<[float]>; +def Quaternionf = Quaternion(); +def Quaternion = Quaternion(); +def QUATERNION_IDENTITY = quaternion::IDENTITY(); +def QUATERNIONF_IDENTITY = quaternion::IDENTITY(); -def Matrix2f = Matrix2x2<[float]>; -def Matrix2 = Matrix2x2<[double]>; -def Matrix3f = Matrix3x3<[float]>; -def Matrix3 = Matrix3x3<[double]>; -def Matrix4f = Matrix4x4<[float]>; -def Matrix4 = Matrix4x4<[double]>; -def matrix4_ortho = matrix::ortho<[double]>; -def matrix4_perspective = matrix::perspective<[double]>; -def matrix4f_ortho = matrix::ortho<[float]>; -def matrix4f_perspective = matrix::perspective<[float]>; +def Matrix2f = Matrix2x2(); +def Matrix2 = Matrix2x2(); +def Matrix3f = Matrix3x3(); +def Matrix3 = Matrix3x3(); +def Matrix4f = Matrix4x4(); +def Matrix4 = Matrix4x4(); +def matrix4_ortho = matrix::ortho(); +def matrix4_perspective = matrix::perspective(); +def matrix4f_ortho = matrix::ortho(); +def matrix4f_perspective = matrix::perspective(); -def MATRIX2_IDENTITY = matrix::IDENTITY2<[double]>; -def MATRIX2F_IDENTITY = matrix::IDENTITY2<[float]>; -def MATRIX3_IDENTITY = matrix::IDENTITY3<[double]>; -def MATRIX3F_IDENTITY = matrix::IDENTITY3<[float]>; -def MATRIX4_IDENTITY = matrix::IDENTITY4<[double]>; -def MATRIX4F_IDENTITY = matrix::IDENTITY4<[float]>; +def MATRIX2_IDENTITY = matrix::IDENTITY2(); +def MATRIX2F_IDENTITY = matrix::IDENTITY2(); +def MATRIX3_IDENTITY = matrix::IDENTITY3(); +def MATRIX3F_IDENTITY = matrix::IDENTITY3(); +def MATRIX4_IDENTITY = matrix::IDENTITY4(); +def MATRIX4F_IDENTITY = matrix::IDENTITY4(); <* diff --git a/lib/std/math/math_vector.c3 b/lib/std/math/math_vector.c3 index 9cdf44f3e..f2613c5ac 100644 --- a/lib/std/math/math_vector.c3 +++ b/lib/std/math/math_vector.c3 @@ -66,8 +66,8 @@ fn Vec3 Vec3.refract(self, Vec3 n, double r) => refract3(self, n, r); fn void ortho_normalize(Vec3f* v1, Vec3f* v2) => ortho_normalize3(v1, v2); fn void ortho_normalized(Vec3* v1, Vec3* v2) => ortho_normalize3(v1, v2); -fn Matrix4f matrix4f_look_at(Vec3f eye, Vec3f target, Vec3f up) @deprecated => matrix::look_at<[float]>(eye, target, up); -fn Matrix4 matrix4_look_at(Vec3 eye, Vec3 target, Vec3 up) @deprecated => matrix::look_at<[double]>(eye, target, up); +fn Matrix4f matrix4f_look_at(Vec3f eye, Vec3f target, Vec3f up) @deprecated => matrix::look_at()(eye, target, up); +fn Matrix4 matrix4_look_at(Vec3 eye, Vec3 target, Vec3 up) @deprecated => matrix::look_at()(eye, target, up); fn Vec3f Vec3f.rotate_quat(self, Quaternionf q) => rotate_by_quat3(self, q); fn Vec3 Vec3.rotate_quat(self, Quaternion q) => rotate_by_quat3(self, q); diff --git a/lib/std/net/url.c3 b/lib/std/net/url.c3 index 3f1564dc9..27ede360b 100644 --- a/lib/std/net/url.c3 +++ b/lib/std/net/url.c3 @@ -240,11 +240,11 @@ fn String Url.to_string(&self, Allocator allocator = allocator::heap()) @dynamic return builder.copy_str(allocator); } -def UrlQueryValueList = List<[String]>; +def UrlQueryValueList = List(); struct UrlQueryValues { - inline HashMap<[String, UrlQueryValueList]> map; + inline HashMap() map; UrlQueryValueList key_order; } diff --git a/lib/std/os/backtrace.c3 b/lib/std/os/backtrace.c3 index 79e118ccf..f7c6f0bf1 100644 --- a/lib/std/os/backtrace.c3 +++ b/lib/std/os/backtrace.c3 @@ -91,7 +91,7 @@ fn void*[] capture_current(void*[] buffer) $endswitch } -def BacktraceList = List<[Backtrace]>; +def BacktraceList = List(); def symbolize_backtrace = linux::symbolize_backtrace @if(env::LINUX); def symbolize_backtrace = win32::symbolize_backtrace @if(env::WIN32); diff --git a/lib/std/sort/countingsort.c3 b/lib/std/sort/countingsort.c3 index 3101cc1e3..fa28f2cb9 100644 --- a/lib/std/sort/countingsort.c3 +++ b/lib/std/sort/countingsort.c3 @@ -11,17 +11,17 @@ Sort list using the counting sort algorithm. macro countingsort(list, key_fn = EMPTY_MACRO_SLOT) @builtin { usz len = sort::len_from_list(list); - cs::csort<[$typeof(list), $typeof(key_fn)]>(list, 0, len, key_fn, ~((uint)0)); + cs::csort(<$typeof(list), $typeof(key_fn)>)(list, 0, len, key_fn, ~((uint)0)); } macro insertionsort_indexed(list, start, end, cmp = EMPTY_MACRO_SLOT, context = EMPTY_MACRO_SLOT) @builtin { - is::isort<[$typeof(list), $typeof(cmp), $typeof(context)]>(list, (usz)start, (usz)end, cmp, context); + is::isort(<$typeof(list), $typeof(cmp), $typeof(context)>)(list, (usz)start, (usz)end, cmp, context); } macro quicksort_indexed(list, start, end, cmp = EMPTY_MACRO_SLOT, context = EMPTY_MACRO_SLOT) @builtin { - qs::qsort<[$typeof(list), $typeof(cmp), $typeof(context)]>(list, (isz)start, (isz)(end-1), cmp, context); + qs::qsort(<$typeof(list), $typeof(cmp), $typeof(context)>)(list, (isz)start, (isz)(end-1), cmp, context); } module std::sort::cs(); diff --git a/lib/std/sort/insertionsort.c3 b/lib/std/sort/insertionsort.c3 index 041458dca..ab1c6b371 100644 --- a/lib/std/sort/insertionsort.c3 +++ b/lib/std/sort/insertionsort.c3 @@ -10,10 +10,10 @@ macro insertionsort(list, cmp = EMPTY_MACRO_SLOT, context = EMPTY_MACRO_SLOT) @b { $if @typekind(list) == POINTER &&& (@typekind(*list) == ARRAY || @typekind(*list) == VECTOR): $typeof((*list)[0])[] list2 = list; - is::isort<[$typeof(list2), $typeof(cmp), $typeof(context)]>(list2, 0, list.len, cmp, context); + is::isort(<$typeof(list2), $typeof(cmp), $typeof(context)>)(list2, 0, list.len, cmp, context); $else usz len = sort::len_from_list(list); - is::isort<[$typeof(list), $typeof(cmp), $typeof(context)]>(list, 0, (isz)len, cmp, context); + is::isort(<$typeof(list), $typeof(cmp), $typeof(context)>)(list, 0, (isz)len, cmp, context); $endif } diff --git a/lib/std/sort/quicksort.c3 b/lib/std/sort/quicksort.c3 index 24701ea53..156d6a2f6 100644 --- a/lib/std/sort/quicksort.c3 +++ b/lib/std/sort/quicksort.c3 @@ -11,10 +11,10 @@ macro quicksort(list, cmp = EMPTY_MACRO_SLOT, context = EMPTY_MACRO_SLOT) @built { $if @typekind(list) == POINTER &&& (@typekind(*list) == ARRAY || @typekind(*list) == VECTOR): $typeof((*list)[0])[] list2 = list; - qs::qsort<[$typeof(list2), $typeof(cmp), $typeof(context)]>(list2, 0, (isz)list.len - 1, cmp, context); + qs::qsort(<$typeof(list2), $typeof(cmp), $typeof(context)>)(list2, 0, (isz)list.len - 1, cmp, context); $else usz len = sort::len_from_list(list); - qs::qsort<[$typeof(list), $typeof(cmp), $typeof(context)]>(list, 0, (isz)len - 1, cmp, context); + qs::qsort(<$typeof(list), $typeof(cmp), $typeof(context)>)(list, 0, (isz)len - 1, cmp, context); $endif } @@ -30,7 +30,7 @@ list will be partially sorted. macro quickselect(list, isz k, cmp = EMPTY_MACRO_SLOT, context = EMPTY_MACRO_SLOT) @builtin { usz len = sort::len_from_list(list); - return qs::qselect<[$typeof(list), $typeof(cmp), $typeof(context)]>(list, 0, (isz)len - 1, k, cmp, context); + return qs::qselect(<$typeof(list), $typeof(cmp), $typeof(context)>)(list, 0, (isz)len - 1, k, cmp, context); } module std::sort::qs(); diff --git a/releasenotes.md b/releasenotes.md index 9f06beeea..1a5018cfd 100644 --- a/releasenotes.md +++ b/releasenotes.md @@ -7,7 +7,6 @@ - Add `win-debug` setting to be able to pick dwarf for output #1855. - Error on switch case fallthough if there is more than one newline #1849. - Added flags to `c3c project view` to filter displayed properties -- VERY experimental `<[ ]>` syntax for generics. - Compile time array assignment #1806. - Allow `+++` to work on all types of arrays. - Allow `(int[*]) { 1, 2 }` cast style initialization. diff --git a/resources/examples/contextfree/boolerr.c3 b/resources/examples/contextfree/boolerr.c3 index 9f2ccbb9c..a581e697b 100644 --- a/resources/examples/contextfree/boolerr.c3 +++ b/resources/examples/contextfree/boolerr.c3 @@ -3,10 +3,10 @@ import libc; import std::io; import std::collections::maybe; -def MaybeString = Maybe<[String]>; -def MaybeHead = Maybe<[Head]>; -def new_head_val = maybe::value<[Head]>; -def new_string_val = maybe::value<[String]>; +def MaybeString = Maybe(); +def MaybeHead = Maybe(); +def new_head_val = maybe::value(); +def new_string_val = maybe::value(); fault TitleResult { diff --git a/src/compiler/parse_expr.c b/src/compiler/parse_expr.c index cc49aba88..347f4aa58 100644 --- a/src/compiler/parse_expr.c +++ b/src/compiler/parse_expr.c @@ -91,20 +91,14 @@ static bool parse_expr_list(ParseContext *c, Expr ***exprs_ref, TokenType end_to /** * generic_parameters ::= '(<' expr (',' expr) '>)' */ -bool parse_generic_parameters(ParseContext *c, Expr ***exprs_ref, bool is_new_syntax) +bool parse_generic_parameters(ParseContext *c, Expr ***exprs_ref) { - advance_and_verify(c, is_new_syntax ? TOKEN_LBRACKET : TOKEN_LGENPAR); + advance_and_verify(c, TOKEN_LGENPAR); while (true) { ASSIGN_EXPR_OR_RET(Expr *expr, parse_expr(c), false); vec_add(*exprs_ref, expr); if (try_consume(c, TOKEN_COMMA)) continue; - if (is_new_syntax) - { - CONSUME_OR_RET(TOKEN_RBRACKET, false); - CONSUME_OR_RET(TOKEN_GREATER, false); - return true; - } CONSUME_OR_RET(TOKEN_RGENPAR, false); return true; } @@ -1115,25 +1109,13 @@ static Expr *parse_subscript_expr(ParseContext *c, Expr *left) static Expr *parse_generic_expr(ParseContext *c, Expr *left) { ASSERT(left && expr_ok(left)); - bool is_new_syntax = tok_is(c, TOKEN_LESS); - if (is_new_syntax) advance(c); Expr *subs_expr = expr_new_expr(EXPR_GENERIC_IDENT, left); subs_expr->generic_ident_expr.parent = exprid(left); - if (!parse_generic_parameters(c, &subs_expr->generic_ident_expr.parmeters, is_new_syntax)) return poisoned_expr; + if (!parse_generic_parameters(c, &subs_expr->generic_ident_expr.parmeters)) return poisoned_expr; RANGE_EXTEND_PREV(subs_expr); return subs_expr; } -static Expr *parse_less(ParseContext *c, Expr *left) -{ - if (c->lexer.token_type == TOKEN_LBRACKET) - { - return parse_generic_expr(c, left); - } - return parse_binary(c, left); -} - - /** * access_expr ::= '.' primary_expr */ @@ -2097,7 +2079,7 @@ ParseRule rules[TOKEN_EOF + 1] = { [TOKEN_NOT_EQUAL] = { NULL, parse_binary, PREC_RELATIONAL }, [TOKEN_GREATER] = { NULL, parse_binary, PREC_RELATIONAL }, [TOKEN_GREATER_EQ] = { NULL, parse_binary, PREC_RELATIONAL }, - [TOKEN_LESS] = { NULL, parse_less, PREC_RELATIONAL }, + [TOKEN_LESS] = { NULL, parse_binary, PREC_RELATIONAL }, [TOKEN_LESS_EQ] = { NULL, parse_binary, PREC_RELATIONAL }, [TOKEN_SHL] = { NULL, parse_binary, PREC_SHIFT }, [TOKEN_SHR] = { NULL, parse_binary, PREC_SHIFT }, diff --git a/src/compiler/parse_global.c b/src/compiler/parse_global.c index 4739059b1..834631a1c 100644 --- a/src/compiler/parse_global.c +++ b/src/compiler/parse_global.c @@ -501,12 +501,11 @@ static inline TypeInfo *parse_base_type(ParseContext *c) /** * generic_type ::= type generic_parameters */ -static inline TypeInfo *parse_generic_type(ParseContext *c, TypeInfo *type, bool is_new_syntax) +static inline TypeInfo *parse_generic_type(ParseContext *c, TypeInfo *type) { ASSERT(type_info_ok(type)); TypeInfo *generic_type = type_info_new(TYPE_INFO_GENERIC, type->span); - if (is_new_syntax) advance(c); - if (!parse_generic_parameters(c, &generic_type->generic.params, is_new_syntax)) return poisoned_type_info; + if (!parse_generic_parameters(c, &generic_type->generic.params)) return poisoned_type_info; generic_type->generic.base = type; return generic_type; } @@ -616,16 +615,8 @@ TypeInfo *parse_type_with_base(ParseContext *c, TypeInfo *type_info) case TOKEN_LBRACKET: type_info = parse_array_type_index(c, type_info); break; - case TOKEN_LESS: - if (c->lexer.token_type != TOKEN_LBRACKET) - { - PRINT_ERROR_HERE("This looks like you're comparing a type? Or did you intend to write a generic type? In that case the syntax is 'Foo<[int]>'."); - return poisoned_type_info; - } - type_info = parse_generic_type(c, type_info, true); - break; case TOKEN_LGENPAR: - type_info = parse_generic_type(c, type_info, false); + type_info = parse_generic_type(c, type_info); break; case TOKEN_STAR: advance(c); diff --git a/src/compiler/parser_internal.h b/src/compiler/parser_internal.h index fef77c45e..94f7f43b7 100644 --- a/src/compiler/parser_internal.h +++ b/src/compiler/parser_internal.h @@ -55,7 +55,7 @@ Decl *parse_local_decl_after_type(ParseContext *c, TypeInfo *type); Decl *parse_var_decl(ParseContext *c); bool parse_current_is_expr(ParseContext *c); -bool parse_generic_parameters(ParseContext *c, Expr ***exprs_ref, bool is_new_syntax); +bool parse_generic_parameters(ParseContext *c, Expr ***exprs_ref); bool parse_parameters(ParseContext *c, Decl ***params_ref, Variadic *variadic, int *vararg_index_ref, ParameterParseKind parse_kind); diff --git a/test/test_suite/generic/generic_parsing.c3 b/test/test_suite/generic/generic_parsing.c3 index b4c2425a6..652eea977 100644 --- a/test/test_suite/generic/generic_parsing.c3 +++ b/test/test_suite/generic/generic_parsing.c3 @@ -3,20 +3,20 @@ import std; def ListStr = List(); fn void test() { - List a = List<...>.new_init(); // #error: This looks like you're comparing a + List a = List<...>.new_init(); // #error: An expression was expected } fn void test2() { - List<[String]> a = List<...>.new_init(); // #error: This looks like you're comparing a + List() a = List<...>.new_init(); // #error: An expression was expected } fn void test3() { - List() a = List<[...]>.new_init(); // #error: An expression was expected + List() a = List(<...>).new_init(); // #error: An expression was expected } fn void main() { - List a = List.new_init(); // #error: This looks like you're comparing a + List a = List.new_init(); // #error: An expression was expected } \ No newline at end of file