Skip to content

Instantly share code, notes, and snippets.

@gkossakowski
Created December 22, 2016 00:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gkossakowski/398eece6a0658ec6ddfa2431ce73b7ee to your computer and use it in GitHub Desktop.
Save gkossakowski/398eece6a0658ec6ddfa2431ce73b7ee to your computer and use it in GitHub Desktop.
An example of a leaky type completer in Dotty
// Ensure constructor is completed so that any parameter accessors
// which have type trees deriving from its parameters can be
// completed in turn. Note that parent types access such parameter
// accessors, that's why the constructor needs to be completed before
// the parent types are elaborated.
index(constr)
annotate(constr :: params)
symbolOfTree(constr).ensureCompleted()
indexAndAnnotate(rest)(inClassContext(selfInfo))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment