Skip to content

Ambigious types errors by picking nested/derived type and type defined in the same package #17433

Closed
@WojciechMazur

Description

@WojciechMazur

Compiler version

3.3.1-RC1-bin-20230504-0e00420-NIGHTLY

Found in Community Build in following projects:

Project Version Build URL Notes
endpoints4s/endpoints4s 1.9.0 Open CB logs
sangria-graphql/sangria 4.0.0-RC4 Open CB logs
zio/zio-prelude 1.0.0-RC18 -> 1.0.0-RC19 Open CB logs

Output

In this case Value is also defined as sealed trait Value in other file

Error:  -- [E049] Reference Error: /build/repo/modules/core/src/main/scala/sangria/ast/AstVisitorCommand.scala:6:30 
Error:  6 |  val Skip, Continue, Break = Value
Error:    |                              ^^^^^
Error:    |                    Reference to Value is ambiguous.
Error:    |                    It is both defined in package sangria.ast
Error:    |                    and inherited subsequently in object AstVisitorCommand
Error:    |

Expectation

Should compile

Metadata

Metadata

Assignees

Labels

itype:bugregressionThis worked in a previous version but doesn't anymorestat:needs minimizationNeeds a self contained minimization

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions