mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-29 11:34:58 +01:00
Allow interleaving of STDOUT and STDERR check lines. Put STDOUT lines after the line they're attached to, and STDERR lines before. If no STDOUT check line is attached to any line, then put them all at the end of the file instead. This is intended to better handle the case where stdout contains unreplaced mentions of line numbers, and also reflects that stdout is typically a consequence of the test rather than commentary on it, so placing it after the test seems likely to read better.
33 lines
740 B
Plaintext
33 lines
740 B
Plaintext
// 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
|
|
//
|
|
// AUTOUPDATE
|
|
|
|
package ExplorerTest api;
|
|
|
|
interface A(T:! type) { let AResult:! type; }
|
|
interface B(T:! type) { let BResult:! A(T); }
|
|
interface I(T:! type) {
|
|
let X:! B(T);
|
|
// The constraints introduced by X should be in scope here.
|
|
let Y:! X.BResult.AResult;
|
|
}
|
|
|
|
class CA {
|
|
extend impl as A(i32) where .AResult = i32 {}
|
|
}
|
|
class CB {
|
|
extend impl as B(i32) where .BResult = CA {}
|
|
}
|
|
class CI {
|
|
extend impl as I(i32) where .X = CB and .Y = 5 {}
|
|
}
|
|
|
|
fn Main() -> i32 {
|
|
var v: CI = {};
|
|
return v.(I(i32).Y);
|
|
}
|
|
|
|
// CHECK:STDOUT: result: 5
|