Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
kekyo committed Apr 29, 2024
1 parent 26dadb1 commit e31832f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
13 changes: 3 additions & 10 deletions chibild/chibild.core/Generating/AssemblyInputFragment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -207,16 +207,9 @@ static bool MethodEquals(MethodReference lhs, MethodReference rhs) =>
// Name
lhs.Name == rhs.Name &&
lhs.ReturnType.FullName == rhs.ReturnType.FullName &&
lhs.Name switch
{
// Special cases on return type overloading.
"op_Implicit" => true,
"op_Explicit" => true,
_ =>
lhs.Parameters.
Select(p => p.ParameterType.FullName).
SequenceEqual(rhs.Parameters.Select(p => p.ParameterType.FullName)),
};
lhs.Parameters.
Select(p => p.ParameterType.FullName).
SequenceEqual(rhs.Parameters.Select(p => p.ParameterType.FullName));

// Resolve on fallback assembly resolver.
var exactModule = this.ResovleOnFallbackModule(fallbackModule, md);
Expand Down
6 changes: 3 additions & 3 deletions toolchain.common/Parsing/CilParser_FunctionBody.cs
Original file line number Diff line number Diff line change
Expand Up @@ -592,11 +592,11 @@ private bool ParseHiddenDirective(
LabelNode[] labels,
Location? location)
{
if (tokens.Length > 2)
if (tokens.Length > 3)
{
this.OutputError(
tokens[2],
$"Too many operands: {tokens[2]}");
tokens[3],
$"Too many operands: {tokens[3]}");
return null;
}

Expand Down

0 comments on commit e31832f

Please sign in to comment.