[love-api] love.Data:clone() -> love.Data

Open Beginner friendly
#1,776 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
62/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
lua
Domain
tooling

Research direction

Locate the love.Data:clone() function annotation in the love API definitions and inspect how related inheritance or generic annotations are expressed. Update the annotation so cloning a subtype such as love.ImageData preserves that subtype, then verify the resulting type information for the example described in the issue.

Written by the indexing model from the issue text.

Description

enhancement

Currently love.Data:clone() returns love.Data, but love.Data is a superclass. That means if you clone love.ImageData, you will receive love.Data (not love.ImageData as expected). Use generics in this function annotation.

Dominant language
Lua
Stars
4.4k
Forks
442
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from LuaLS/lua-language-server

All issues in LuaLS/lua-language-server

Similar issues

More Lua issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.