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

rokucommunity / brighterscript / #14385

09 May 2025 11:44AM UTC coverage: 87.032% (-2.0%) from 89.017%
#14385

push

web-flow
Merge a194c3925 into 489231ac7

13732 of 16677 branches covered (82.34%)

Branch coverage included in aggregate %.

8175 of 8874 new or added lines in 103 files covered. (92.12%)

84 existing lines in 22 files now uncovered.

14604 of 15881 relevant lines covered (91.96%)

20324.31 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;
29✔
11

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

14
    public isBuiltIn = true;
29✔
15

16
    get returnType() {
17
        return DynamicType.instance;
776✔
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)) {
4,012✔
31
            return false;
1✔
32
        }
33
        return !!targetType;
4,011✔
34
    }
35

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

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

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

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

52
    getCallFuncType(name: string, options: GetSymbolTypeOptions) {
NEW
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