bound types

This commit is contained in:
nub31
2025-07-09 20:44:20 +02:00
parent a0b7b9026c
commit 8a5dd88446
4 changed files with 80 additions and 39 deletions

View File

@@ -37,14 +37,14 @@ public class DefinitionTable
return structNode.Fields.Where(x => x.Name == field);
}
public IEnumerable<TraitFuncImplSyntax> LookupTraitFuncImpl(NubType forType, string name)
{
return _definitions
.OfType<TraitImplSyntax>()
.Where(x => x.ForType == forType)
.SelectMany(x => x.Functions)
.Where(x => x.Name == name);
}
// public IEnumerable<TraitFuncImplSyntax> LookupTraitFuncImpl(NubType forType, string name)
// {
// return _definitions
// .OfType<TraitImplSyntax>()
// .Where(x => x.ForType == forType)
// .SelectMany(x => x.Functions)
// .Where(x => x.Name == name);
// }
public IEnumerable<TraitSyntax> LookupTrait(string @namespace, string name)
{