Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generics not properly resolved #29

Open
pherrymason opened this issue Jul 29, 2024 · 0 comments
Open

Generics not properly resolved #29

pherrymason opened this issue Jul 29, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@pherrymason
Copy link
Owner

pherrymason commented Jul 29, 2024

When resolving types, if generics are involved, the LSP usually cannot find the real type.

Examples:

Access path where a funciton returns wrapped Generic.

module app;
import std::collections;

struct Home {
	List(<Room>) rooms;
}
struct Room {
	String name;
}
fn void Room.paint() {}

fn void main() {
	Home home;
	home.rooms.get(0).paint(); // <--- get(0) returns a Room! 
}

Aliases not resolved when interacting with a generic

module app;
import std::collections;

def RoomList = List(<Room>);
struct Room {
	String name;
}
fn void Room.paint() {}

fn void main() {
	RoomList rooms;
        rooms.get(0).paint(); // <--- Here, paint() is never found because the indirection caused because of definition.
}
@pherrymason pherrymason added the bug Something isn't working label Jul 29, 2024
@pherrymason pherrymason modified the milestones: 0.0.7, 0.0.8, 0.1.0 Jul 31, 2024
@pherrymason pherrymason removed this from the 0.1.0 milestone Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant