diff --git a/packages/safe-ds-lang/tests/resources/validation/types/checking/default values/with type parameters.sdstest b/packages/safe-ds-lang/tests/resources/validation/types/checking/default values/with type parameters.sdstest new file mode 100644 index 000000000..5b48a14ae --- /dev/null +++ b/packages/safe-ds-lang/tests/resources/validation/types/checking/default values/with type parameters.sdstest @@ -0,0 +1,19 @@ +package tests.validation.types.checking.defaultValues + +class SomeClass( + // $TEST$ no error r"Expected type .* but got .*\." + p1: T1 = »true«, + // $TEST$ no error r"Expected type .* but got .*\." + p2: T1 = »1«, + // $TEST$ error "Expected type 'T2' but got 'literal<"">'." + p3: T2 = »""«, +) + +fun someFunction( + // $TEST$ no error r"Expected type .* but got .*\." + p1: T1 = »true«, + // $TEST$ no error r"Expected type .* but got .*\." + p2: T1 = »1«, + // $TEST$ error "Expected type 'T2' but got 'literal<"">'." + p3: T2 = »""«, +)