mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 07:41:12 +00:00
Improve expectation for platform requires mismatch
``` ── TYPE MISMATCH ───── examples/hello-world/rust-platform/./Package-Config.roc ─ Something is off with the type annotation of the main required symbol: 2│ requires {} { main : a -> a } ^^^^^^ This #UserApp.main value is a: Str But the type annotation on main says it should be: a -> a ──────────────────────────────────────────────────────────────────────────────── ```
This commit is contained in:
parent
514af619f5
commit
ef77ff35cf
3 changed files with 11 additions and 1 deletions
|
@ -1708,6 +1708,9 @@ pub enum AnnotationSource {
|
|||
TypedBody {
|
||||
region: Region,
|
||||
},
|
||||
RequiredSymbol {
|
||||
region: Region,
|
||||
},
|
||||
}
|
||||
|
||||
impl AnnotationSource {
|
||||
|
@ -1716,6 +1719,7 @@ impl AnnotationSource {
|
|||
&Self::TypedIfBranch { region, .. }
|
||||
| &Self::TypedWhenBranch { region, .. }
|
||||
| &Self::TypedBody { region, .. } => region,
|
||||
&Self::RequiredSymbol { region, .. } => region,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue