mirror of
https://codeberg.org/ProgramSnail/lang.git
synced 2025-12-06 06:58:46 +00:00
part of constuctor typecheck (constructors for different types)
This commit is contained in:
parent
005fb6aaf3
commit
d7f1b6c377
3 changed files with 217 additions and 59 deletions
|
|
@ -177,9 +177,10 @@ inline std::optional<size_t> get_parameters_count(Type type) {
|
|||
return std::nullopt;
|
||||
case Type::ARRAY:
|
||||
case Type::OPTIONAL:
|
||||
case Type::RESULT:
|
||||
case Type::ERROR:
|
||||
return 1;
|
||||
case Type::RESULT: // RESULT[T E] = T | Error[E]
|
||||
return 2;
|
||||
// -- basic types
|
||||
case Type::FLOAT:
|
||||
case Type::DOUBLE:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue