Revert "improve abstraction for AssocList, fix bug in optional else (#315)" (#320)

This reverts commit bf6bb800c4.
This commit is contained in:
Dave Abrahams
2021-03-01 12:26:56 -05:00
committed by GitHub
parent 8b3bb7c5e9
commit f5300a84e5
55 changed files with 7431 additions and 293 deletions
+18
View File
@@ -0,0 +1,18 @@
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
// The behavior of this program is undefined because it tries to
// access a local variable after its lifetime is over.
fn f() -> Int* {
var int: x;
x = 0;
return &x;
}
fn main() -> int {
var Ptr(int): p;
p = f();
return *p;
}