Add failing test
This commit is contained in:
parent
1470e7fbdd
commit
9d9331f4b0
@ -616,8 +616,8 @@ fn primary_expr_no_struct(input: Span) -> ParseResult<ExpressionKind> {
|
|||||||
bool_literal,
|
bool_literal,
|
||||||
float_literal,
|
float_literal,
|
||||||
number_literal,
|
number_literal,
|
||||||
string_literal,
|
|
||||||
self_expr,
|
self_expr,
|
||||||
|
string_literal,
|
||||||
)),
|
)),
|
||||||
)(input)
|
)(input)
|
||||||
}
|
}
|
||||||
|
@ -270,3 +270,20 @@ fn duplicate_struct_members() {
|
|||||||
] if type_name == &Fqsn::from_strs(&["Tarak", "Tarak"]) && member == "mets"
|
] if type_name == &Fqsn::from_strs(&["Tarak", "Tarak"]) && member == "mets"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn methods() {
|
||||||
|
let source = r#"
|
||||||
|
|
||||||
|
type Foo = { x: Int, y: Int }
|
||||||
|
|
||||||
|
impl Foo {
|
||||||
|
fn hella() {
|
||||||
|
self.x + 50
|
||||||
|
}
|
||||||
|
}
|
||||||
|
"#;
|
||||||
|
let (symbols, _) = add_symbols(source);
|
||||||
|
symbols.debug();
|
||||||
|
assert!(symbols.fq_names.table.get(&make_fqsn(&["hella"])).is_some());
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user