Skip to content

Commit

Permalink
Merge 7ea72cd into d5aa2d6
Browse files Browse the repository at this point in the history
  • Loading branch information
esdrubal authored Aug 7, 2024
2 parents d5aa2d6 + 7ea72cd commit 204da92
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 2 deletions.
14 changes: 12 additions & 2 deletions sway-core/src/semantic_analysis/ast_node/declaration/impl_trait.rs
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,12 @@ impl TyImplSelfOrTrait {
(ImplItem::Type(_type_decl), TyTraitItem::Type(_decl_ref)) => {
// Already processed.
}
_ => unreachable!(),
_ => {
handler.emit_err(CompileError::Internal(
"Unexpected ImplItem tuple.",
Span::dummy(),
));
}
}
}

Expand Down Expand Up @@ -542,7 +547,12 @@ impl TyImplSelfOrTrait {
(ImplItem::Type(_type_decl), TyTraitItem::Type(_decl_ref)) => {
// Already processed.
}
_ => unreachable!(),
_ => {
handler.emit_err(CompileError::Internal(
"Unexpected ImplItem tuple.",
Span::dummy(),
));
}
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
out
target
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[[package]]
name = "core"
source = "path+from-root-082ED3C1A64D1BB4"

[[package]]
name = "lexer_errors"
source = "member"
dependencies = ["core"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[project]
authors = ["Fuel Labs <contact@fuel.sh>"]
entry = "main.sw"
license = "Apache-2.0"
name = "lexer_errors"
implicit-std = false

[dependencies]
core = { path = "../../../../../../sway-lib-core" }
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
library;

pub struct R {
a: u32,
}

impl R {
pub fn from_str(new: i32) {
p() {
:Script => {
c = ZERO_B256;
), }
}

const OFFSET = 0;
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
category = "fail"

# check: $()error
# check: $()mismatched delimiters

# check: $()error
# check: $()impl R {
# nextln: $()unclosed delimiter

0 comments on commit 204da92

Please # to comment.