-
```rust
#[test]
fn trait_parameter() {
test! {
program {
#[non_enumerable]
trait Trait {
type Assoc;
}
struct Foo…
-
The following does not seem to work in Motoko without either declaring types in the method generics or on the function definition for `Iter.map()`
```motoko
let arr : [Int] = [1, 2, 3];
let arr2 : …
-
### 🔎 Search Terms
type inference, fail, unknown, {}, assign, inferred type
### 🕗 Version & Regression Information
- This is the behavior in every version I tried
### ⏯ Playground Link
…
-
```
What steps will reproduce the problem?
define lookup : ( int -> int ) { (2,3,5,7,11) swap nth nip }
What is the expected output?
type: (int -> int)
What do you see instead?
type error in functio…
-
If a type is specified for an assignment then that type should be used when generating code.
If a type isn't specified we should infer it. To do this we should have multiple patterns used to find ou…
-
I just made a simple alternative parser that outputs an AST. This could allow doing some introspection
For example, you can now get all imported names given an AST:
![image](https://user-images.g…
-
type inference broken with @[]
### Example
```nim
when true:
proc fn[T](a: seq[T], b: openArray[T]) =
echo a, ",", b
fn(seq[int].default, [1,2]) # ok
fn(@[0], [1,2]) # ok
fn(@[],…
-
To support more robust autocomplete in the code editors, we should use type inference before determining the possible completions
-
- [x] setup project using [domdomegg/hindley-milner-typescript](https://github.com/domdomegg/hindley-milner-typescript) or [hindley-milner-typescript-minimal](https://github.com/domdomegg/hindley-miln…
-
### Checklist
- [X] I have searched related issues but cannot get the expected help.
- [X] 2. I have read the [FAQ documentation](https://github.com/open-mmlab/mmdeploy/tree/main/docs/en/faq.md) but …