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

rokucommunity / brighterscript / #15129

28 Jan 2026 03:47PM UTC coverage: 87.193% (-1.8%) from 88.969%
#15129

push

web-flow
Merge aa579b555 into 610607efc

14637 of 17741 branches covered (82.5%)

Branch coverage included in aggregate %.

69 of 71 new or added lines in 11 files covered. (97.18%)

825 existing lines in 47 files now uncovered.

15395 of 16702 relevant lines covered (92.17%)

24785.89 hits per line

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

91.3
/src/types/DynamicType.ts
1
import type { TypeCompatibilityData } from '../interfaces';
2
import { isDynamicType, isUninitializedType, isVoidType } from '../astUtils/reflection';
1✔
3
import { BscType } from './BscType';
1✔
4
import { BscTypeKind } from './BscTypeKind';
1✔
5
import { BuiltInInterfaceAdder } from './BuiltInInterfaceAdder';
1✔
6
import type { GetSymbolTypeOptions } from '../SymbolTable';
7

8
export class DynamicType extends BscType {
1✔
9

10
    public readonly kind = BscTypeKind.DynamicType;
30✔
11

12
    public static readonly instance = new DynamicType();
1✔
13

14
    public isBuiltIn = true;
30✔
15

16
    get returnType() {
17
        return DynamicType.instance;
779✔
18
    }
19

20
    public isAssignableTo(targetType: BscType) {
21
        //everything can be dynamic, so as long as a type is provided, this is true
UNCOV
22
        return !!targetType;
×
23
    }
24

25
    /**
26
     * The dynamic type is convertible to everything.
27
     */
28
    public isTypeCompatible(targetType: BscType, data?: TypeCompatibilityData) {
29
        //everything can be dynamic, so as long as a type is provided, this is true
30
        if (isVoidType(targetType) || isUninitializedType(targetType)) {
638✔
31
            return false;
1✔
32
        }
33
        return !!targetType;
637✔
34
    }
35

36
    public toString() {
37
        return 'dynamic';
10,033✔
38
    }
39

40
    public toTypeString(): string {
41
        return this.toString();
4✔
42
    }
43

44
    public isEqual(targetType: BscType) {
45
        return isDynamicType(targetType);
71✔
46
    }
47

48
    getMemberType(memberName: string, options: GetSymbolTypeOptions) {
49
        return DynamicType.instance;
702✔
50
    }
51

52
    getCallFuncType(name: string, options: GetSymbolTypeOptions) {
UNCOV
53
        return DynamicType.instance;
×
54
    }
55

56

57
}
58

59
BuiltInInterfaceAdder.primitiveTypeInstanceCache.set('dynamic', DynamicType.instance);
1✔
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