handle class fields and methods

This commit is contained in:
ychenfo 2021-08-23 02:52:54 +08:00
parent 40b062ce0f
commit 364054331c
2 changed files with 632 additions and 337 deletions

View File

@ -83,7 +83,7 @@ pub fn parse_type_annotation<T>(
// it could be a type variable
let ty = resolver
.get_symbol_type(unifier, primitives, x)
.ok_or_else(|| "Cannot use function name as type".to_owned())?;
.ok_or_else(|| "unknown type variable name".to_owned())?;
if let TypeEnum::TVar { .. } = &*unifier.get_ty(ty) {
Ok(ty)
} else {

File diff suppressed because it is too large Load Diff