FuelLabs / FuelLabs/sway

ICE: Self type not provided for type alias declarations in impls

Open
#6,969 1 comment 0 reactions 0 assignees View on GitHub
bug compiler: frontend team:compiler
Dominant language
Rust
Stars
61.4k
Forks
5.4k
Avg merge
3h 33m
Merged PRs (30d)
4

Description

The following impls both result in an ICE:

```
struct S {}

impl S {
type D = [u64;1];
}
```

```
struct C {
a: T
}

impl C{
type D = [T; 1];
}
```

The error message is `Self type not provided`.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the two type-alias examples from the issue and locating the compiler path that handles associated type declarations in impls. Trace why the Self type is missing for both non-generic and generic impls; done means neither example produces an ICE and the compiler reports the intended result or diagnostic.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.