Strange cyclic reference errors in complex inheritance source with opaque types #20414
Labels
area:opaque-types
area:reporting
Error reporting including formatting, implicit suggestions, etc
better-errors
Issues concerned with improving confusing/unhelpful diagnostic messages
itype:enhancement
Compiler version
3.4.1, 3.4.2, 3.5.0-RC1
Minimized example
Output Error/Warning message
Not found: type ColorRGB
type Texture is not a member of object O.LowLevel
Cyclic reference involving type DataTexture
Why this Error/Warning was not helpful
There is a cyclic dependency involving
type DataTexture
reported, while in fact there is none, just a missing declaration.There is type not found reported for
type ColorRGB
, but the type is defined OK.This happened in a large project to me where I deleted declaration of
type Texture = ...
by mistake. The error about non-existent type Texture was drowned in about a hundred error messages about non-existentColorRGB
and other types exported by the same export.When the
opaque type DataTexture
is replaced with just plaintype DataTexture
, the cyclic reference error no longer appears, but the error Not found: type ColorRGB is still present.Suggested improvement
Report the missing type, do not report any cyclic dependency which is not there.
Note
When you remove the unused declaration of
object TypesImpl extends Types
, the error Not found: type ColorRGB no longer appears, which is also strange.The text was updated successfully, but these errors were encountered: