Skip to content
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

[Scala 2.13] Subtype of Newtype cause cyclic subtyping error #1183

Closed
guizmaii opened this issue Aug 28, 2023 · 19 comments
Closed

[Scala 2.13] Subtype of Newtype cause cyclic subtyping error #1183

guizmaii opened this issue Aug 28, 2023 · 19 comments
Assignees

Comments

@guizmaii
Copy link
Member

guizmaii commented Aug 28, 2023

Same issue as in #817

Reproducer:

object type {
  type UUIDv1 = UUIDv1.Type
  object UUIDv1 extends Subtype[UUID]
  
  type UserId = UserId.Type
  object UserId extends Subtype[UUIDv1]
}

Error:

[error] example.scala:48:8: cyclic aliasing or subtyping involving type Type
[error]   type UserId = UserId.Type

Cc @kitlangton

@guizmaii
Copy link
Member Author

guizmaii commented Oct 9, 2023

See also: #949 (comment)

@jdegoes
Copy link
Member

jdegoes commented Oct 9, 2023

/bounty $100

@algora-pbc
Copy link

algora-pbc bot commented Oct 9, 2023

💎 $100 bounty created by jdegoes
🙋 If you start working on this, comment /attempt #1183 to notify everyone
👉 To claim this bounty, submit a pull request that includes the text /claim #1183 somewhere in its body
📝 Before proceeding, please make sure you can receive payouts in your country
💵 Payment arrives in your account 2-5 days after the bounty is rewarded
💯 You keep 100% of the bounty award
🙏 Thank you for contributing to zio/zio-prelude!

Attempt Started (GMT+0) Solution
🔴 @cheikh2shift Oct 9, 2023, 6:06:47 PM WIP
🔴 @guptasamarth61 Oct 20, 2023, 7:21:08 AM WIP
🔴 @Tan28bha Nov 3, 2023, 7:58:06 PM WIP
🔴 @abebeos Nov 21, 2023, 12:17:55 PM WIP
🟡 @Krishnakalani111 Dec 6, 2023, 8:34:30 AM WIP

@cheikh2shift
Copy link

cheikh2shift commented Oct 9, 2023

/attempt #1183

Options

@algora-pbc
Copy link

algora-pbc bot commented Oct 16, 2023

@cheikh2shift: Reminder that in 7 days the bounty will become up for grabs, so please submit a pull request before then 🙏

@guptasamarth61
Copy link

guptasamarth61 commented Oct 20, 2023

/attempt #1183

Options

@algora-pbc
Copy link

algora-pbc bot commented Oct 27, 2023

@guptasamarth61: Reminder that in 7 days the bounty will become up for grabs, so please submit a pull request before then 🙏

Copy link

algora-pbc bot commented Nov 3, 2023

The bounty is up for grabs! Everyone is welcome to /attempt #1183 🙌

@Tan28bha
Copy link

Tan28bha commented Nov 3, 2023

/attempt #1183

Options

@Tan28bha
Copy link

Tan28bha commented Nov 4, 2023

/attempt #1183

@ghost ghost mentioned this issue Nov 23, 2023
@adamgfraser
Copy link
Contributor

@abebeos This is wrong. Users should be able to define types that are subtypes or new types of other user defined types, whether those types are subtypes or new types.

Copy link

algora-pbc bot commented Nov 28, 2023

@abebeos: Reminder that in 7 days the bounty will become up for grabs, so please submit a pull request before then 🙏

Copy link

algora-pbc bot commented Dec 5, 2023

The bounty is up for grabs! Everyone is welcome to /attempt #1183 🙌

@Krishnakalani111
Copy link

Krishnakalani111 commented Dec 6, 2023

/attempt #1183

Options

Copy link

algora-pbc bot commented Dec 13, 2023

@Krishnakalani111: Reminder that in 7 days the bounty will become up for grabs, so please submit a pull request before then 🙏

@SethTisue
Copy link

SethTisue commented Dec 13, 2023

(I'm not certain it's relevant as I haven't followed the history closely, but regardless, FYI:)

a fix for scala/bug#12622 has been merged for Scala 2.13.13 and is available for testing in Scala 2 nightly builds

@adamgfraser
Copy link
Contributor

@SethTisue Awesome! I can confirm that this resolves the issue. Do you have any idea when the next version will be released? Thanks for the update! 😃

@adamgfraser
Copy link
Contributor

This will be fixed when the next Scala 2.13 version is released.

@SethTisue
Copy link

probably January — you can monitor https://contributors.scala-lang.org/t/scala-2-13-13-release-planning/6315 if you like

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants