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

Fixed bug regarding String instantiation #315

Merged
merged 1 commit into from
Dec 23, 2015
Merged

Fixed bug regarding String instantiation #315

merged 1 commit into from
Dec 23, 2015

Conversation

EliasC
Copy link
Contributor

@EliasC EliasC commented Dec 23, 2015

@albertnetymk suggested a refactoring of how Strings are instantiated,
which leaves the work of turning string literals into constructor calls
completely to the desugarer, leaving the typechecker oblivious to the
existence of two different kind of strings (C-level strings and
Encore-level strings). In the process, a bug was discovered and
squished:

class T

class Main {
  def main() : void {
    new String("foo");
    new String(new T); -- Crashes the compiler
  }
}

@albertnetymk suggested a refactoring of how Strings are instantiated,
which leaves the work of turning string literals into constructor calls
completely to the desugarer, leaving the typechecker oblivious to the
existence of two different kind of strings (C-level strings and
Encore-level strings). In the process, a bug was discovered and
squished:

```
class T

class Main {
  def main() : void {
    new String("foo");
    new String(new T); -- Crashes the compiler
  }
}
```
@albertnetymk
Copy link
Contributor

Would merge it in an hour if no objections.

albertnetymk added a commit that referenced this pull request Dec 23, 2015
Fixed bug regarding String instantiation
@albertnetymk albertnetymk merged commit 18d7578 into parapluu:development Dec 23, 2015
@EliasC EliasC deleted the fix/string-instantiation branch December 23, 2015 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants