• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rokucommunity / brighterscript / #15219

22 Feb 2026 02:27AM UTC coverage: 87.193% (-0.006%) from 87.199%
#15219

push

web-flow
Merge d0c9a16a7 into 1556715dd

14749 of 17875 branches covered (82.51%)

Branch coverage included in aggregate %.

107 of 117 new or added lines in 19 files covered. (91.45%)

161 existing lines in 16 files now uncovered.

15493 of 16809 relevant lines covered (92.17%)

25604.58 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

98.31
/src/types/ClassType.ts
1
import { SymbolTable } from '../SymbolTable';
1✔
2
import { isClassType, isDynamicType, isInvalidType, isObjectType, isTypeStatementType } from '../astUtils/reflection';
1✔
3
import type { TypeCompatibilityData } from '../interfaces';
4
import type { BscType } from './BscType';
5
import { BscTypeKind } from './BscTypeKind';
1✔
6
import { BuiltInInterfaceAdder } from './BuiltInInterfaceAdder';
1✔
7
import { InheritableType } from './InheritableType';
1✔
8
import type { ReferenceType } from './ReferenceType';
9
import { isUnionTypeCompatible } from './helpers';
1✔
10

11
export class ClassType extends InheritableType {
1✔
12

13
    constructor(public name: string, superClass?: ClassType | ReferenceType) {
616✔
14
        super(name, superClass);
616✔
15
    }
16

17
    public readonly kind = BscTypeKind.ClassType;
616✔
18

19
    public isTypeCompatible(targetType: BscType, data?: TypeCompatibilityData) {
20
        while (isTypeStatementType(targetType)) {
73✔
NEW
21
            targetType = targetType.wrappedType;
×
22
        }
23
        if (this.isEqual(targetType, data)) {
73✔
24
            return true;
48✔
25
        } else if (
25✔
26
            isInvalidType(targetType) ||
96✔
27
            isDynamicType(targetType) ||
28
            isObjectType(targetType) ||
29
            isUnionTypeCompatible(this, targetType, data)) {
30
            return true;
2✔
31
        } else if (isClassType(targetType)) {
23✔
32
            return this.isTypeDescendent(targetType);
21✔
33
        }
34
        return false;
2✔
35
    }
36

37
    isEqual(targetType: BscType, data?: TypeCompatibilityData): boolean {
38
        if (targetType === this) {
177✔
39
            return true;
71✔
40
        }
41
        return isClassType(targetType) && super.isEqual(targetType, data);
106✔
42
    }
43

44
    private builtInMemberTable: SymbolTable;
45

46
    getBuiltInMemberTable(): SymbolTable {
47

48
        if (!this.parentType) {
452✔
49
            if (this.builtInMemberTable) {
349✔
50
                return this.builtInMemberTable;
3✔
51
            }
52
            this.builtInMemberTable = new SymbolTable(`${this.__identifier} Built-in Members`);
346✔
53
            this.pushMemberProvider(() => this.builtInMemberTable);
4,287✔
54
            return this.builtInMemberTable;
346✔
55
        }
56
    }
57

58
    private hasStartedAddingBuiltInInterfaces = false;
616✔
59

60
    addBuiltInInterfaces() {
61
        if (!this.hasAddedBuiltInInterfaces && !this.hasStartedAddingBuiltInInterfaces) {
1,879✔
62
            this.hasStartedAddingBuiltInInterfaces = true;
448✔
63
            if (this.parentType) {
448✔
64
                this.parentType.addBuiltInInterfaces();
102✔
65
            }
66
            BuiltInInterfaceAdder.addBuiltInInterfacesToType(this);
448✔
67
        }
68
        this.hasAddedBuiltInInterfaces = true;
1,879✔
69
    }
70
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc