Begin README; Add type check for functions
This commit is contained in:
parent
9b74023ade
commit
169260b8c1
@ -0,0 +1,5 @@
|
|||||||
|
# Dust
|
||||||
|
|
||||||
|
High-level programming language with effortless concurrency, automatic memory management, type
|
||||||
|
safety and advanced error handling.
|
||||||
|
|
@ -75,6 +75,20 @@ impl Type {
|
|||||||
|
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
(
|
||||||
|
Type::Function {
|
||||||
|
parameter_types: left_parameters,
|
||||||
|
return_type: left_return,
|
||||||
|
},
|
||||||
|
Type::Function {
|
||||||
|
parameter_types: right_parameters,
|
||||||
|
return_type: right_return,
|
||||||
|
},
|
||||||
|
) => {
|
||||||
|
if left_return == right_return && left_parameters == right_parameters {
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
}
|
||||||
(Type::Named(left), Type::Named(right)) => {
|
(Type::Named(left), Type::Named(right)) => {
|
||||||
if left == right {
|
if left == right {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
|
Loading…
Reference in New Issue
Block a user