Skip to content

Unsupported type annotation: list #455

Open
@Aasthaengg

Description

@Aasthaengg

I have implemented functions for math.py which work when running with PYTHONPATH=src/runtime/ltypes python3 src/runtime/math.py but give Unsupported type annotation: list when running with ./src/bin/lpython src/runtime/math.py -o output && ./output.

Here's the sample fsum() function implementation.

def fsum(data: list) -> f64:
    """
    Sum of the elements of `data`.
    """
    sum: f64
    sum = 0.0

    i: i32
    for i in range(len(data)):
        sum += data[i]
    return sum

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions