Skip to content

Generic Type Infer Failed #2322

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

Closed
HerrCai0907 opened this issue Jun 14, 2022 · 0 comments · Fixed by #2323
Closed

Generic Type Infer Failed #2322

HerrCai0907 opened this issue Jun 14, 2022 · 0 comments · Fixed by #2323
Labels

Comments

@HerrCai0907
Copy link
Member

// index.ts
import * as lib from "./lib";
export function test(): void {
  lib.test(new lib.Wrapper<i32>());
}
// lib.ts
export function test<T = i32>(t: Wrapper<T>): void {}
export class Wrapper<T> {
  v: T;
}

It will receive this error

ERROR TS2304: Cannot find name 'Wrapper'.

 export function test<T = i32>(t: Wrapper<T>): void {}
                                  ~~~~~~~
 in assembly/lib.ts(1,34)
@HerrCai0907 HerrCai0907 changed the title Generic Infer Failed Generic Type Infer Failed Jun 14, 2022
HerrCai0907 added a commit to HerrCai0907/assemblyscript that referenced this issue Jun 14, 2022
HerrCai0907 added a commit to HerrCai0907/assemblyscript that referenced this issue Jun 14, 2022
@romdotdog romdotdog added the bug label Jun 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants