2021-12-20 13:10:17 +00:00
|
|
|
// SPDX-License-Identifier: UNLICENSED
|
|
|
|
pragma solidity >=0.8.0;
|
|
|
|
|
|
|
|
import {Weather as Wetter} from "./lib.sol";
|
2022-03-15 17:52:59 +00:00
|
|
|
// ^ @wheatherImportCursor
|
2021-12-20 13:10:17 +00:00
|
|
|
import "./lib.sol" as That;
|
2022-03-15 17:52:59 +00:00
|
|
|
// ^^^^ @ThatImport
|
2021-12-20 13:10:17 +00:00
|
|
|
|
|
|
|
contract C
|
|
|
|
{
|
|
|
|
function test_symbol_alias() public pure returns (Wetter result)
|
2022-03-15 17:52:59 +00:00
|
|
|
// ^ @WetterCursor
|
2021-12-20 13:10:17 +00:00
|
|
|
{
|
|
|
|
result = Wetter.Sunny;
|
|
|
|
}
|
|
|
|
|
|
|
|
function test_library_alias() public pure returns (That.Color result)
|
2022-03-15 17:52:59 +00:00
|
|
|
// ^ @ThatCursor
|
2021-12-20 13:10:17 +00:00
|
|
|
{
|
|
|
|
That.Color color = That.Color.Red;
|
2022-03-15 17:52:59 +00:00
|
|
|
// ^ @ThatVarCursor ^ @ThatExpressionCursor
|
2021-12-20 13:10:17 +00:00
|
|
|
result = color;
|
|
|
|
}
|
|
|
|
}
|
2022-03-15 17:52:59 +00:00
|
|
|
// ----
|
|
|
|
// lib: @diagnostics 2072
|
|
|
|
// -> textDocument/definition {
|
|
|
|
// "position": @wheatherImportCursor
|
|
|
|
// }
|
|
|
|
// <- [
|
|
|
|
// {
|
|
|
|
// "range": @whetherEnum,
|
|
|
|
// "uri": "lib.sol"
|
|
|
|
// }
|
|
|
|
// ]
|
|
|
|
// -> textDocument/definition {
|
|
|
|
// "position": @WetterCursor
|
|
|
|
// }
|
|
|
|
// <- [
|
|
|
|
// {
|
|
|
|
// "range": @whetherEnum,
|
|
|
|
// "uri": "lib.sol"
|
|
|
|
// }
|
|
|
|
// ]
|
|
|
|
// -> textDocument/definition {
|
|
|
|
// "position": @ThatCursor
|
|
|
|
// }
|
|
|
|
// <- [
|
|
|
|
// {
|
|
|
|
// "range": @ColorEnum,
|
|
|
|
// "uri": "lib.sol"
|
|
|
|
// }
|
|
|
|
// ]
|
|
|
|
// -> textDocument/definition {
|
|
|
|
// "position": @ThatVarCursor
|
|
|
|
// }
|
|
|
|
// <- [
|
|
|
|
// {
|
|
|
|
// "range": @ColorEnum,
|
|
|
|
// "uri": "lib.sol"
|
|
|
|
// }
|
|
|
|
// ]
|
|
|
|
// -> textDocument/definition {
|
|
|
|
// "position": @ThatExpressionCursor
|
|
|
|
// }
|
|
|
|
// <- [
|
|
|
|
// {
|
|
|
|
// "range": @ThatImport,
|
|
|
|
// "uri": "goto_definition_imports.sol"
|
|
|
|
// }
|
|
|
|
// ]
|