mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
Fix a spelling mistake; how was this ever passing?
This commit is contained in:
parent
2eefe9ff6d
commit
f680ee3c24
5 changed files with 8 additions and 8 deletions
|
@ -234,7 +234,7 @@ pub fn to_pattern2<'a>(
|
||||||
Pattern2::CharacterLiteral(char)
|
Pattern2::CharacterLiteral(char)
|
||||||
} else {
|
} else {
|
||||||
// multiple chars is found
|
// multiple chars is found
|
||||||
let problem = MalformedPatternProblem::MulitpleCharsInSingleQuote;
|
let problem = MalformedPatternProblem::MultipleCharsInSingleQuote;
|
||||||
malformed_pattern(env, problem, region)
|
malformed_pattern(env, problem, region)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -312,7 +312,7 @@ pub fn canonicalize_expr<'a>(
|
||||||
(Expr::SingleQuote(char), Output::default())
|
(Expr::SingleQuote(char), Output::default())
|
||||||
} else {
|
} else {
|
||||||
// multiple chars is found
|
// multiple chars is found
|
||||||
let error = roc_problem::can::RuntimeError::MulitpleCharsInSingleQuote(region);
|
let error = roc_problem::can::RuntimeError::MultipleCharsInSingleQuote(region);
|
||||||
let answer = Expr::RuntimeError(error.clone());
|
let answer = Expr::RuntimeError(error.clone());
|
||||||
|
|
||||||
(answer, Output::default())
|
(answer, Output::default())
|
||||||
|
|
|
@ -246,7 +246,7 @@ pub fn canonicalize_pattern<'a>(
|
||||||
Pattern::SingleQuote(char)
|
Pattern::SingleQuote(char)
|
||||||
} else {
|
} else {
|
||||||
// multiple chars is found
|
// multiple chars is found
|
||||||
let problem = MalformedPatternProblem::MulitpleCharsInSingleQuote;
|
let problem = MalformedPatternProblem::MultipleCharsInSingleQuote;
|
||||||
malformed_pattern(env, problem, region)
|
malformed_pattern(env, problem, region)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -177,7 +177,7 @@ pub enum RuntimeError {
|
||||||
/// where ''
|
/// where ''
|
||||||
EmptySingleQuote(Region),
|
EmptySingleQuote(Region),
|
||||||
/// where 'aa'
|
/// where 'aa'
|
||||||
MulitpleCharsInSingleQuote(Region),
|
MultipleCharsInSingleQuote(Region),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||||
|
@ -189,5 +189,5 @@ pub enum MalformedPatternProblem {
|
||||||
QualifiedIdentifier,
|
QualifiedIdentifier,
|
||||||
BadIdent(roc_parse::ident::BadIdent),
|
BadIdent(roc_parse::ident::BadIdent),
|
||||||
EmptySingleQuote,
|
EmptySingleQuote,
|
||||||
MulitpleCharsInSingleQuote,
|
MultipleCharsInSingleQuote,
|
||||||
}
|
}
|
||||||
|
|
|
@ -845,14 +845,14 @@ fn pretty_runtime_error<'b>(
|
||||||
Unknown => " ",
|
Unknown => " ",
|
||||||
QualifiedIdentifier => " qualified ",
|
QualifiedIdentifier => " qualified ",
|
||||||
EmptySingleQuote => " empty character literal ",
|
EmptySingleQuote => " empty character literal ",
|
||||||
MulitpleCharsInSingleQuote => " overfull literal ",
|
MultipleCharsInSingleQuote => " overfull literal ",
|
||||||
};
|
};
|
||||||
|
|
||||||
let tip = match problem {
|
let tip = match problem {
|
||||||
MalformedInt | MalformedFloat | MalformedBase(_) => alloc
|
MalformedInt | MalformedFloat | MalformedBase(_) => alloc
|
||||||
.tip()
|
.tip()
|
||||||
.append(alloc.reflow("Learn more about number literals at TODO")),
|
.append(alloc.reflow("Learn more about number literals at TODO")),
|
||||||
EmptySingleQuote | MulitpleCharsInSingleQuote | Unknown | BadIdent(_) => {
|
EmptySingleQuote | MultipleCharsInSingleQuote | Unknown | BadIdent(_) => {
|
||||||
alloc.nil()
|
alloc.nil()
|
||||||
}
|
}
|
||||||
QualifiedIdentifier => alloc.tip().append(
|
QualifiedIdentifier => alloc.tip().append(
|
||||||
|
@ -1160,7 +1160,7 @@ fn pretty_runtime_error<'b>(
|
||||||
|
|
||||||
title = SYNTAX_PROBLEM;
|
title = SYNTAX_PROBLEM;
|
||||||
}
|
}
|
||||||
RuntimeError::MulitpleCharsInSingleQuote(region) => {
|
RuntimeError::MultipleCharsInSingleQuote(region) => {
|
||||||
let tip = alloc
|
let tip = alloc
|
||||||
.tip()
|
.tip()
|
||||||
.append(alloc.reflow("Learn more about character literals at TODO"));
|
.append(alloc.reflow("Learn more about character literals at TODO"));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue