-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: error if call receiver is class without constructor
- Loading branch information
1 parent
128b98d
commit 23d960f
Showing
2 changed files
with
20 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
tests/resources/validation/types/checking/called class must have constructor/main.sdstest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package tests.validation.types.checking.calledClassMustHaveConstructor | ||
|
||
class A | ||
|
||
class B() | ||
|
||
pipeline test { | ||
|
||
// $TEST$ error "Cannot instantiate a class that has no constructor." | ||
val a = »A«(); | ||
|
||
// $TEST$ no error "Cannot instantiate a class that has no constructor." | ||
val b = »B«(); | ||
} |