core: Express member func def IDs as offsets from class def ID

This commit is contained in:
David Mak 2024-03-06 12:24:39 +08:00
parent 2317516cf6
commit b26cb2b360

View File

@ -416,9 +416,9 @@ pub fn get_builtins(primitives: &mut (PrimitiveStore, Unifier)) -> BuiltinInfo {
type_vars: vec![option_ty_var], type_vars: vec![option_ty_var],
fields: vec![], fields: vec![],
methods: vec![ methods: vec![
("is_some".into(), is_some_ty.0, DefinitionId(11)), ("is_some".into(), is_some_ty.0, DefinitionId(PRIMITIVE_DEF_IDS.option.0 + 1)),
("is_none".into(), is_some_ty.0, DefinitionId(12)), ("is_none".into(), is_some_ty.0, DefinitionId(PRIMITIVE_DEF_IDS.option.0 + 2)),
("unwrap".into(), unwrap_ty.0, DefinitionId(13)), ("unwrap".into(), unwrap_ty.0, DefinitionId(PRIMITIVE_DEF_IDS.option.0 + 3)),
], ],
ancestors: vec![TypeAnnotation::CustomClass { ancestors: vec![TypeAnnotation::CustomClass {
id: PRIMITIVE_DEF_IDS.option, id: PRIMITIVE_DEF_IDS.option,