Skip to content

Commit 096987e

Browse files
authored
fix: Interface default implementation is now an error (#1421)
1 parent 62d1f54 commit 096987e

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

compiler/plc_diagnostics/src/diagnostics/diagnostics_registry.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ lazy_static! {
214214
E110, Error, include_str!("./error_codes/E110.md"), // Invalid POU Type for Interface Implementation
215215
E111, Error, include_str!("./error_codes/E111.md"), // Duplicate interface methods with different signatures
216216
E112, Error, include_str!("./error_codes/E112.md"), // Incomplete interface implementation
217-
E113, Warning, include_str!("./error_codes/E113.md"), // Interface default method implementation
217+
E113, Error, include_str!("./error_codes/E113.md"), // Interface default method implementation
218218
E114, Error, include_str!("./error_codes/E114.md"), // Multiple extensions of same POU
219219
E115, Error, include_str!("./error_codes/E115.md"), // Property in unsupported POU type
220220
E116, Error, include_str!("./error_codes/E116.md"), // Property defined in unsupported variable block

src/parser/tests/interface_parser_tests.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -390,15 +390,14 @@ mod error_handling {
390390
";
391391

392392
let diagnostics = parse_and_validate_buffered(source);
393-
insta::assert_snapshot!(diagnostics, @r###"
394-
warning[E113]: Interfaces can not have a default implementations
393+
insta::assert_snapshot!(diagnostics, @r"
394+
error[E113]: Interfaces can not have a default implementations
395395
┌─ <internal>:4:17
396396
397397
4 │ ╭ 1 > 2;
398398
5 │ │ methodA := 5;
399399
│ ╰─────────────────────────────^ Interfaces can not have a default implementations
400-
401-
"###);
400+
");
402401
}
403402

404403
#[test]

0 commit comments

Comments
 (0)