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

Fix example #35

Open
wants to merge 42 commits into
base: typeclass-experiments
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
c6b3b5c
New modularity language import
odersky Jan 7, 2024
8b12c03
A relaxation concerning exported type aliases
odersky Dec 15, 2023
fba554c
Allow class parents to be refined types.
odersky Dec 13, 2023
ebc6626
Allow vals in using clauses of givens
odersky Nov 18, 2023
8a10f96
Introduce tracked class parameters
odersky Nov 18, 2023
11e3c11
Some tweaks to modularity.md
odersky Jan 7, 2024
c1124bc
Make some context bound evidence params tracked
odersky Dec 25, 2023
88d91cb
Make explicit arguments for context bounds an error from 3.5
odersky Dec 23, 2023
e983566
Use the name of the type parameter as context bound evidence
odersky Jan 7, 2024
5285c7c
Allow contecxt bounds with abstract `This` types
odersky Jan 7, 2024
cd83448
Drop restriction against typedefs at level * only
odersky Jan 7, 2024
c1a04cd
Allow types in given definitions to be infix types
odersky Jan 7, 2024
ed0922f
New syntax for given defs
odersky Jan 7, 2024
96d9487
Rename This to Self as instance type of type classes
odersky Jan 7, 2024
f8c07bb
Add `is` type to Predef
odersky Jan 7, 2024
875dcbf
Allow multiple context bounds in `{...}`
odersky Jan 7, 2024
907635a
Allow renamings `as N` in context bounds
odersky Jan 7, 2024
c48d4e5
Implement `deferredSummon`
odersky Jan 7, 2024
bac4db9
Allow context bounds in type declarations
odersky Jan 7, 2024
3b6600c
Tweak position where synthetic evidence parameters are added
odersky Jan 7, 2024
e3f8252
Fix typing of generated context bound refinements
odersky Jan 7, 2024
0b74e02
Hylolib: Switch to member based type classes
odersky Jan 2, 2024
cd83e4e
Hylolib: Use name of bound parameter for context bounds
odersky Jan 2, 2024
9b289a1
Hylolib: Some stylistic tweaks
odersky Jan 2, 2024
ed4782b
Hylolib: Drop usages of `with` in givens
odersky Jan 2, 2024
8efdd8e
Dealias before checking for illegal class parents
odersky Jan 3, 2024
2cb5cd5
Hylolib: Alternative, statically safe Slice design
odersky Jan 3, 2024
bb63cfd
Rename `deferredSummon` to `deferred` and allow it for defs
odersky Jan 7, 2024
3d7ae34
Treat new style given syntax without a rhs or template as concrete
odersky Jan 7, 2024
c5f513d
Fix typing of RefinedTypes with watching parents
odersky Jan 7, 2024
9f453ca
Show that this solves #10929
odersky Jan 7, 2024
49af9d0
Disambiguate more towards new given syntax, show solution for #15840
odersky Jan 7, 2024
caf0be0
Also reduce term projections
odersky Jan 6, 2024
5479ff4
Refine rules when context bound evidence is tracked
odersky Jan 6, 2024
443fe7a
Add a doc page
odersky Jan 8, 2024
2f3fbe7
Do deferred given resolution only at typer phase
odersky Jan 8, 2024
1d77374
Update SemanticDB expects to account for named context bound evidence…
odersky Jan 8, 2024
e3dcdb5
Fix typos
odersky Jan 8, 2024
aae3a5f
Update docs/_docs/reference/experimental/typeclasses.md
odersky Jan 8, 2024
83e18d3
Update syntax changes section in doc page
odersky Jan 9, 2024
e6d5fa9
Update docs/_docs/reference/experimental/typeclasses.md
odersky Jan 11, 2024
2aa5b93
Fix example
sideeffffect Jan 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Dealias before checking for illegal class parents
  • Loading branch information
odersky committed Jan 11, 2024
commit 8efdd8ec61571df96439fb24e67c054cf6a01446
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/transform/PostTyper.scala
Original file line number Diff line number Diff line change
@@ -423,7 +423,7 @@ class PostTyper extends MacroTransform with InfoTransformer { thisPhase =>
// these refinements are split off from the parent type constructor
// application `parent` in Namer and don't show up as parent types
// of the class.
val illegalRefs = parent.tpe.stripRefinement.namedPartsWith:
val illegalRefs = parent.tpe.dealias.stripRefinement.namedPartsWith:
p => p.symbol.is(ParamAccessor) && (p.symbol.owner eq sym)
if illegalRefs.nonEmpty then
report.error(