1/* 2 * Copyright (C) 2016 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17package tests.errors.syntax@1.0; 18 19// c++ keyword: error 20struct asm {}; 21// java keyword: error 22struct transient {}; 23// c++ collide: error 24struct offsetof {}; 25struct size_t {}; 26// hidl names: should warn 27struct hidl_vec{}; 28// interface reserved: should be okay 29struct version{}; 30 31interface IIdentifier1 { 32 // c++ keyword: error 33 alignof(); 34 // java keyword: error 35 native(); 36 // c++ collide: error 37 IMPLEMENT_REGISTER_AND_GET_SERVICE(); 38 // interface reserved: should error 39 dump(); 40 // struct reserved: should be okay 41 readEmbeddedFromParcel(); 42}; 43 44struct GoodStruct { 45 // java keyword: error 46 int32_t native; 47 // struct reserved: should error 48 int32_t readEmbeddedFromParcel; 49 // interface reserved: should be okay 50 int32_t dump; 51}; 52