-
Notifications
You must be signed in to change notification settings - Fork 12.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle regions correctly in class ctors and dtors
Class ctors and dtors were always getting assigned the empty region before, which meant a reference to the "self" region in a ctor argument got resolved to a named region called "self" rather than the class's self region, which led to a rather confusing error message as documented in #2502. Closes #2502
- Loading branch information
1 parent
3b4cfde
commit f4fb0f9
Showing
2 changed files
with
19 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
class font/& { | ||
let fontbuf: &self.[u8]; | ||
|
||
new(fontbuf: &self.[u8]) { | ||
self.fontbuf = fontbuf; | ||
} | ||
|
||
fn buf() -> &self.[u8] { | ||
self.fontbuf | ||
} | ||
} | ||
|
||
fn main() { } |